home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume25 / listserv5.31 / part01 next >
Encoding:
Internet Message Format  |  1991-12-13  |  78.4 KB

  1. Subject: v25i035: listserv5.31 - mailing list management system, Part01/06
  2. Newsgroups: comp.sources.unix
  3. Approved: vixie@pa.dec.com
  4.  
  5. Submitted-By: tasos@cs.bu.edu
  6. Posting-Number: Volume 25, Issue 35
  7. Archive-Name: listserv5.31/part01
  8.  
  9. This is a system that implements  various  discussion  lists
  10. with  one  list server. It is automated, and obliterates the
  11. need for  user  intervention  and  maintenance  of  multiple
  12. aliases  of  the form "list, list-owner, list-request", etc.
  13. There is support provided  for  archives,  moderated  lists,
  14. peer lists, news connections and gateways, and mail queuing.
  15.  
  16. [ Essentially, this is bunch of tools that lets people subscribe,
  17.   unsubscribe, and get various info about mailing lists automatically.  The
  18.   tools take incoming mail for the list(s) and distribute them to the
  19.   active subscribers.  It also provides an interface (via mail) for archives,
  20.   allowing remote users to list and retreive things from the archive.
  21.  
  22.   The main hook for the system is through the machine's aliases file.  All
  23.   incoming mail is dumped into a queue for the various lists, and then
  24.   the tools that he provide process the queues.
  25.  
  26.   I think that this is a pretty useful system.  It would be neat if it
  27.   gained wide-spread usage.                    --Nick ]
  28.  
  29. [ I am sad to see that the man pages are not in source form; this practice
  30.   is hereby discouraged in all future postings.                 --vix ]
  31.  
  32. #! /bin/sh
  33. # This is a shell archive.  Remove anything before this line, then unpack
  34. # it by saving it into a file and typing "sh file".  To overwrite existing
  35. # files, type "sh file -c".  You can also feed this as standard input via
  36. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  37. # will see the following message at the end:
  38. #        "End of archive 1 (of 6)."
  39. # Contents:  .awk .grep .ignored .stats MANIFEST archives
  40. #   archives/listserv archives/listserv/DIR archives/listserv/INDEX
  41. #   archives/listserv/example.dat
  42. #   archives/listserv/example.dat/example.dat1
  43. #   archives/listserv/example.dat/example.dat2
  44. #   archives/listserv/example.dat/example.dat3 archives/listserv/info
  45. #   archives/listserv/refcard archives/pub archives/pub/DIR
  46. #   archives/pub/INDEX archives/pub/info archives/pub/unix
  47. #   archives/pub/unix/DIR archives/pub/unix/INDEX
  48. #   archives/pub/unix/info config doc doc/README doc/farch.nr
  49. #   doc/queue.nr flocks help help/general help/get help/index
  50. #   help/information help/lists help/recipients help/release help/set
  51. #   help/statistics help/subscribe help/unsubscribe news peer queued
  52. #   redux reformat setup src src/Makefile src/REGISTRATION
  53. #   src/global.h src/list.h src/listserv.h src/pqueue.c src/pqueue.h
  54. #   src/serverd.h src/signals.c src/start.h src/struct.h src/tlock.c
  55. #   stds ulock
  56. # Wrapped by vixie@cognition.pa.dec.com on Fri Dec 13 18:31:08 1991
  57. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  58. if test -f '.awk' -a "${1}" != "-c" ; then 
  59.   echo shar: Will not clobber existing file \"'.awk'\"
  60. else
  61. echo shar: Extracting \"'.awk'\" \(423 characters\)
  62. sed "s/^X//" >'.awk' <<'END_OF_FILE'
  63. X{
  64. X  tabcol = 40;
  65. X  l = 0;
  66. X  if (length ($1) < tabcol)
  67. X    l = int ((tabcol + 7 - length ($1)) / 8);
  68. X  printf "%s", $1;
  69. X  k = 8 - int ((length ($1) % 8));
  70. X  for (i = 0; i < k; i++) printf (" ");
  71. X  for (i = 0; i < l; i++) printf "        ";
  72. X  if ($2 != "") printf " %s", $2;
  73. X  if ($3 != "") printf " %s", $3;
  74. X  if ($4 != "") printf " %s", $4;
  75. X  if ($5 != "") printf " %s", $5;
  76. X  if ($6 != "") printf " %s", $6;
  77. X  print "";
  78. X}
  79. END_OF_FILE
  80. if test 423 -ne `wc -c <'.awk'`; then
  81.     echo shar: \"'.awk'\" unpacked with wrong size!
  82. fi
  83. # end of '.awk'
  84. fi
  85. if test -f '.grep' -a "${1}" != "-c" ; then 
  86.   echo shar: Will not clobber existing file \"'.grep'\"
  87. else
  88. echo shar: Extracting \"'.grep'\" \(115 characters\)
  89. sed "s/^X//" >'.grep' <<'END_OF_FILE'
  90. X#!/bin/sh
  91. f="k"
  92. while [ "$f" != "" ]; do
  93. X  read f
  94. X  if [ "$f" != "" ]; then
  95. X    grep -i "$f$" $1 | wc -l
  96. X  fi
  97. done
  98. END_OF_FILE
  99. if test 115 -ne `wc -c <'.grep'`; then
  100.     echo shar: \"'.grep'\" unpacked with wrong size!
  101. fi
  102. # end of '.grep'
  103. fi
  104. if test -f '.ignored' -a "${1}" != "-c" ; then 
  105.   echo shar: Will not clobber existing file \"'.ignored'\"
  106. else
  107. echo shar: Extracting \"'.ignored'\" \(25 characters\)
  108. sed "s/^X//" >'.ignored' <<'END_OF_FILE'
  109. root
  110. server
  111. bin
  112. sys
  113. uucp
  114. END_OF_FILE
  115. if test 25 -ne `wc -c <'.ignored'`; then
  116.     echo shar: \"'.ignored'\" unpacked with wrong size!
  117. fi
  118. # end of '.ignored'
  119. fi
  120. if test -f '.stats' -a "${1}" != "-c" ; then 
  121.   echo shar: Will not clobber existing file \"'.stats'\"
  122. else
  123. echo shar: Extracting \"'.stats'\" \(470 characters\)
  124. sed "s/^X//" >'.stats' <<'END_OF_FILE'
  125. X#!/bin/sh
  126. pth=$1
  127. subscribers=$2
  128. headers=$3
  129. outfile=$4
  130. shift; shift; shift; shift
  131. if [ $# = 0 ]; then
  132. X  if [ `cut -d" " -f1 $subscribers > emails` ]; then
  133. X    exit 1
  134. X  fi
  135. else
  136. X  for user 
  137. X  do
  138. X    echo $user >> emails
  139. X  done
  140. fi
  141. if [ `cat emails | $pth/.grep $headers > counts` ]; then
  142. X  exit 1
  143. fi
  144. if [ `paste emails counts | awk -f $pth/.awk - >> $outfile` ]; then
  145. X  exit 1
  146. fi
  147. echo Total number of messages on file: `cat $headers | wc -l` >> $outfile
  148. rm counts
  149. rm emails
  150. END_OF_FILE
  151. if test 470 -ne `wc -c <'.stats'`; then
  152.     echo shar: \"'.stats'\" unpacked with wrong size!
  153. fi
  154. # end of '.stats'
  155. fi
  156. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  157.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  158. else
  159. echo shar: Extracting \"'MANIFEST'\" \(2445 characters\)
  160. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  161. X   File Name        Archive #    Description
  162. X-----------------------------------------------------------
  163. X .awk                       1    
  164. X .grep                      1    
  165. X .ignored                   1    
  166. X .stats                     1    
  167. X MANIFEST                   1    
  168. X archives                   1    
  169. X archives/listserv          1    
  170. X archives/listserv/DIR      1    
  171. X archives/listserv/INDEX    1    
  172. X archives/listserv/example.dat  1    
  173. X archives/listserv/example.dat/example.dat1  1    
  174. X archives/listserv/example.dat/example.dat2  1    
  175. X archives/listserv/example.dat/example.dat3  1    
  176. X archives/listserv/info     1    
  177. X archives/listserv/refcard  1    
  178. X archives/pub               1    
  179. X archives/pub/DIR           1    
  180. X archives/pub/INDEX         1    
  181. X archives/pub/info          1    
  182. X archives/pub/unix          1    
  183. X archives/pub/unix/DIR      1    
  184. X archives/pub/unix/INDEX    1    
  185. X archives/pub/unix/info     1    
  186. X config                     1    
  187. X doc                        1    
  188. X doc/README                 1    
  189. X doc/farch.nr               1    
  190. X doc/queue.nr               1    
  191. X doc/server.nr              5    
  192. X flocks                     1    
  193. X help                       1    
  194. X help/general               1    
  195. X help/get                   1    
  196. X help/index                 1    
  197. X help/information           1    
  198. X help/lists                 1    
  199. X help/recipients            1    
  200. X help/release               1    
  201. X help/set                   1    
  202. X help/statistics            1    
  203. X help/subscribe             1    
  204. X help/unsubscribe           1    
  205. X news                       1    
  206. X peer                       1    
  207. X queued                     1    
  208. X redux                      1    
  209. X reformat                   1    
  210. X setup                      1    
  211. X src                        1    
  212. X src/Makefile               1    
  213. X src/README                 2    
  214. X src/REGISTRATION           1    
  215. X src/defs.h                 2    
  216. X src/farch.c                3    
  217. X src/global.h               1    
  218. X src/list.c                 4    
  219. X src/list.h                 1    
  220. X src/listserv.c             6    
  221. X src/listserv.h             1    
  222. X src/misc.c                 3    
  223. X src/pqueue.c               1    
  224. X src/pqueue.h               1    
  225. X src/sender.c               2    
  226. X src/serverd.c              2    
  227. X src/serverd.h              1    
  228. X src/signals.c              1    
  229. X src/start.c                2    
  230. X src/start.h                1    
  231. X src/struct.h               1    
  232. X src/sysmail.c              2    
  233. X src/sysmail.h              2    
  234. X src/tlock.c                1    
  235. X stds                       1    
  236. X ulock                      1    
  237. END_OF_FILE
  238. if test 2445 -ne `wc -c <'MANIFEST'`; then
  239.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  240. fi
  241. # end of 'MANIFEST'
  242. fi
  243. if test ! -d 'archives' ; then
  244.     echo shar: Creating directory \"'archives'\"
  245.     mkdir 'archives'
  246. fi
  247. if test ! -d 'archives/listserv' ; then
  248.     echo shar: Creating directory \"'archives/listserv'\"
  249.     mkdir 'archives/listserv'
  250. fi
  251. if test -f 'archives/listserv/DIR' -a "${1}" != "-c" ; then 
  252.   echo shar: Will not clobber existing file \"'archives/listserv/DIR'\"
  253. else
  254. echo shar: Extracting \"'archives/listserv/DIR'\" \(236 characters\)
  255. sed "s/^X//" >'archives/listserv/DIR' <<'END_OF_FILE'
  256. info 1 /usr/server/archives/listserv Info about the master archive
  257. refcard 1 /usr/server/archives/listserv List of available requests
  258. example.dat 3 /usr/server/archives/listserv/example.dat Example file
  259. hosts 1 /etc System's hosts file
  260. END_OF_FILE
  261. if test 236 -ne `wc -c <'archives/listserv/DIR'`; then
  262.     echo shar: \"'archives/listserv/DIR'\" unpacked with wrong size!
  263. fi
  264. # end of 'archives/listserv/DIR'
  265. fi
  266. if test -f 'archives/listserv/INDEX' -a "${1}" != "-c" ; then 
  267.   echo shar: Will not clobber existing file \"'archives/listserv/INDEX'\"
  268. else
  269. echo shar: Extracting \"'archives/listserv/INDEX'\" \(103 characters\)
  270. sed "s/^X//" >'archives/listserv/INDEX' <<'END_OF_FILE'
  271. LISTSERV /usr/server/archives/listserv
  272. pub /usr/server/archives/pub
  273. unix /usr/server/archives/pub/unix
  274. END_OF_FILE
  275. if test 103 -ne `wc -c <'archives/listserv/INDEX'`; then
  276.     echo shar: \"'archives/listserv/INDEX'\" unpacked with wrong size!
  277. fi
  278. # end of 'archives/listserv/INDEX'
  279. fi
  280. if test ! -d 'archives/listserv/example.dat' ; then
  281.     echo shar: Creating directory \"'archives/listserv/example.dat'\"
  282.     mkdir 'archives/listserv/example.dat'
  283. fi
  284. if test -f 'archives/listserv/example.dat/example.dat1' -a "${1}" != "-c" ; then 
  285.   echo shar: Will not clobber existing file \"'archives/listserv/example.dat/example.dat1'\"
  286. else
  287. echo shar: Extracting \"'archives/listserv/example.dat/example.dat1'\" \(27 characters\)
  288. sed "s/^X//" >'archives/listserv/example.dat/example.dat1' <<'END_OF_FILE'
  289. Part 1 of file EXAMPLE.DAT
  290. END_OF_FILE
  291. if test 27 -ne `wc -c <'archives/listserv/example.dat/example.dat1'`; then
  292.     echo shar: \"'archives/listserv/example.dat/example.dat1'\" unpacked with wrong size!
  293. fi
  294. # end of 'archives/listserv/example.dat/example.dat1'
  295. fi
  296. if test -f 'archives/listserv/example.dat/example.dat2' -a "${1}" != "-c" ; then 
  297.   echo shar: Will not clobber existing file \"'archives/listserv/example.dat/example.dat2'\"
  298. else
  299. echo shar: Extracting \"'archives/listserv/example.dat/example.dat2'\" \(27 characters\)
  300. sed "s/^X//" >'archives/listserv/example.dat/example.dat2' <<'END_OF_FILE'
  301. Part 2 of file EXAMPLE.DAT
  302. END_OF_FILE
  303. if test 27 -ne `wc -c <'archives/listserv/example.dat/example.dat2'`; then
  304.     echo shar: \"'archives/listserv/example.dat/example.dat2'\" unpacked with wrong size!
  305. fi
  306. # end of 'archives/listserv/example.dat/example.dat2'
  307. fi
  308. if test -f 'archives/listserv/example.dat/example.dat3' -a "${1}" != "-c" ; then 
  309.   echo shar: Will not clobber existing file \"'archives/listserv/example.dat/example.dat3'\"
  310. else
  311. echo shar: Extracting \"'archives/listserv/example.dat/example.dat3'\" \(27 characters\)
  312. sed "s/^X//" >'archives/listserv/example.dat/example.dat3' <<'END_OF_FILE'
  313. Part 3 of file EXAMPLE.DAT
  314. END_OF_FILE
  315. if test 27 -ne `wc -c <'archives/listserv/example.dat/example.dat3'`; then
  316.     echo shar: \"'archives/listserv/example.dat/example.dat3'\" unpacked with wrong size!
  317. fi
  318. # end of 'archives/listserv/example.dat/example.dat3'
  319. fi
  320. if test -f 'archives/listserv/info' -a "${1}" != "-c" ; then 
  321.   echo shar: Will not clobber existing file \"'archives/listserv/info'\"
  322. else
  323. echo shar: Extracting \"'archives/listserv/info'\" \(50 characters\)
  324. sed "s/^X//" >'archives/listserv/info' <<'END_OF_FILE'
  325. Place to put information for the LISTSERV archive
  326. END_OF_FILE
  327. if test 50 -ne `wc -c <'archives/listserv/info'`; then
  328.     echo shar: \"'archives/listserv/info'\" unpacked with wrong size!
  329. fi
  330. # end of 'archives/listserv/info'
  331. fi
  332. if test -f 'archives/listserv/refcard' -a "${1}" != "-c" ; then 
  333.   echo shar: Will not clobber existing file \"'archives/listserv/refcard'\"
  334. else
  335. echo shar: Extracting \"'archives/listserv/refcard'\" \(289 characters\)
  336. sed "s/^X//" >'archives/listserv/refcard' <<'END_OF_FILE'
  337. Recognized commands are:
  338. X
  339. help [command]
  340. set <list> [<option> <value>]
  341. subscribe <list> <your name>
  342. unsubscribe <list> (or: signoff <list>)
  343. recipients <list> (or: review <list>)
  344. information <list>
  345. statistics <list> [subscriber email address(es)]
  346. lists
  347. index [archive]
  348. get <archive> <file>
  349. END_OF_FILE
  350. if test 289 -ne `wc -c <'archives/listserv/refcard'`; then
  351.     echo shar: \"'archives/listserv/refcard'\" unpacked with wrong size!
  352. fi
  353. # end of 'archives/listserv/refcard'
  354. fi
  355. if test ! -d 'archives/pub' ; then
  356.     echo shar: Creating directory \"'archives/pub'\"
  357.     mkdir 'archives/pub'
  358. fi
  359. if test -f 'archives/pub/DIR' -a "${1}" != "-c" ; then 
  360.   echo shar: Will not clobber existing file \"'archives/pub/DIR'\"
  361. else
  362. echo shar: Extracting \"'archives/pub/DIR'\" \(32 characters\)
  363. sed "s/^X//" >'archives/pub/DIR' <<'END_OF_FILE'
  364. info 1 /usr/server/archives/pub
  365. END_OF_FILE
  366. if test 32 -ne `wc -c <'archives/pub/DIR'`; then
  367.     echo shar: \"'archives/pub/DIR'\" unpacked with wrong size!
  368. fi
  369. # end of 'archives/pub/DIR'
  370. fi
  371. if test -f 'archives/pub/INDEX' -a "${1}" != "-c" ; then 
  372.   echo shar: Will not clobber existing file \"'archives/pub/INDEX'\"
  373. else
  374. echo shar: Extracting \"'archives/pub/INDEX'\" \(64 characters\)
  375. sed "s/^X//" >'archives/pub/INDEX' <<'END_OF_FILE'
  376. PUB /usr/server/archives/pub
  377. unix /usr/server/archives/pub/unix
  378. END_OF_FILE
  379. if test 64 -ne `wc -c <'archives/pub/INDEX'`; then
  380.     echo shar: \"'archives/pub/INDEX'\" unpacked with wrong size!
  381. fi
  382. # end of 'archives/pub/INDEX'
  383. fi
  384. if test -f 'archives/pub/info' -a "${1}" != "-c" ; then 
  385.   echo shar: Will not clobber existing file \"'archives/pub/info'\"
  386. else
  387. echo shar: Extracting \"'archives/pub/info'\" \(45 characters\)
  388. sed "s/^X//" >'archives/pub/info' <<'END_OF_FILE'
  389. Place to put information for the PUB archive
  390. END_OF_FILE
  391. if test 45 -ne `wc -c <'archives/pub/info'`; then
  392.     echo shar: \"'archives/pub/info'\" unpacked with wrong size!
  393. fi
  394. # end of 'archives/pub/info'
  395. fi
  396. if test ! -d 'archives/pub/unix' ; then
  397.     echo shar: Creating directory \"'archives/pub/unix'\"
  398.     mkdir 'archives/pub/unix'
  399. fi
  400. if test -f 'archives/pub/unix/DIR' -a "${1}" != "-c" ; then 
  401.   echo shar: Will not clobber existing file \"'archives/pub/unix/DIR'\"
  402. else
  403. echo shar: Extracting \"'archives/pub/unix/DIR'\" \(37 characters\)
  404. sed "s/^X//" >'archives/pub/unix/DIR' <<'END_OF_FILE'
  405. info 1 /usr/server/archives/pub/unix
  406. END_OF_FILE
  407. if test 37 -ne `wc -c <'archives/pub/unix/DIR'`; then
  408.     echo shar: \"'archives/pub/unix/DIR'\" unpacked with wrong size!
  409. fi
  410. # end of 'archives/pub/unix/DIR'
  411. fi
  412. if test -f 'archives/pub/unix/INDEX' -a "${1}" != "-c" ; then 
  413.   echo shar: Will not clobber existing file \"'archives/pub/unix/INDEX'\"
  414. else
  415. echo shar: Extracting \"'archives/pub/unix/INDEX'\" \(35 characters\)
  416. sed "s/^X//" >'archives/pub/unix/INDEX' <<'END_OF_FILE'
  417. UNIX /usr/server/archives/pub/unix
  418. END_OF_FILE
  419. if test 35 -ne `wc -c <'archives/pub/unix/INDEX'`; then
  420.     echo shar: \"'archives/pub/unix/INDEX'\" unpacked with wrong size!
  421. fi
  422. # end of 'archives/pub/unix/INDEX'
  423. fi
  424. if test -f 'archives/pub/unix/info' -a "${1}" != "-c" ; then 
  425.   echo shar: Will not clobber existing file \"'archives/pub/unix/info'\"
  426. else
  427. echo shar: Extracting \"'archives/pub/unix/info'\" \(40 characters\)
  428. sed "s/^X//" >'archives/pub/unix/info' <<'END_OF_FILE'
  429. Place to put info for the UNIX archive.
  430. END_OF_FILE
  431. if test 40 -ne `wc -c <'archives/pub/unix/info'`; then
  432.     echo shar: \"'archives/pub/unix/info'\" unpacked with wrong size!
  433. fi
  434. # end of 'archives/pub/unix/info'
  435. fi
  436. if test -f 'config' -a "${1}" != "-c" ; then 
  437.   echo shar: Will not clobber existing file \"'config'\"
  438. else
  439. echo shar: Extracting \"'config'\" \(3105 characters\)
  440. sed "s/^X//" >'config' <<'END_OF_FILE'
  441. X#
  442. X#        Discussion list system configuration file
  443. X#
  444. X#                  version 5.31
  445. X#
  446. X#                 December 1991
  447. X#
  448. X# AGREEMENT: This software can be used and distributed freely as long
  449. X# as you do not remove or alter the Copyright notice in the file defs.h;
  450. X# this notice is #define'd in the symbol VERSION. Although you may alter
  451. X# the code provided, you may not alter the functions create_header()
  452. X# and create_multi_recipient_header() in list.c and listserv.c.
  453. X# By using this software you are bound by this agreement.
  454. X# This software comes with no warranties and cannot be sold for profit.
  455. X# The AGREEMENT and COPYRIGHT notices should be included in all source
  456. X# files when distributing this software.
  457. X# COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas
  458. X#
  459. X# Note: On SysV and BSD Unix systems 'sendmail' is located under /usr/lib/
  460. X# but on SysVR4 it is located under /usr/ucblib/; also, check the path to
  461. X# rmail if you are going to use it.
  462. X
  463. organization Boston University         # define your site
  464. server listserv@sal -e -r statistics # define the server w/ restriction (opt.)
  465. list ermis ermis@sal -m 50 -e         # define a list called 'ermis'
  466. list venus venus@sal -e     # define a list called 'venus' (echo to screen)
  467. list herc herc@sal -r -s # define 'herc' w/ restricted mail and no subscription
  468. X             # checking
  469. disable herc statistics     # cannot get statistics for ermis
  470. serverd -l 3 -e     # the serverd program may be run with the -l option
  471. X         # serverd will delay if the load average is above 3
  472. X         # Note that the -1 flag is used by default by start
  473. restriction 20     # certain requests may not be serviced abover this # of users
  474. manager tasos@sal     # email address of the manager of the system
  475. password ellines # password for the 'restart' and 'shutdown' requests
  476. comment server     #Actual comment must be preceded by a pound sign
  477. comment ermis     #Same here
  478. comment venus     #Venus Distribution List
  479. frequency 0     # how often to read mail (in seconds >= 0)
  480. limit message 65536     # reject messages longer than 65536 bytes
  481. option sysv_ps     # forces use of the SYS V ps command; other choice is bsd_ps
  482. option bsd_mail     # define it if BSD mail is available
  483. option post_mail # Post to news; other choice is gate_mail
  484. mailmethod system
  485. X#mailmethod env_var LOGNAME /bin/rmail    # Valid 'mailmethod' options:
  486. X                    # telnet
  487. X                    # sendmail /usr/lib/sendmail -bs
  488. X                    # sendmail /usr/lib/sendmail -t (IDA)
  489. X                    # rmail /bin/rmail
  490. X                    # binmail
  491. X                    # env_var VARIABLE /bin/mail
  492. X                    # env_var VARIABLE /usr/lib/sendmail -t
  493. X                    # env_var VARIABLE /bin/rmail
  494. X                    # env_var VARIABLE /usr/bin/mail
  495. X#
  496. X# WARNING: All other mailmethods except 'system' and 'sendmail'
  497. X# will become obsolete soon.
  498. X#
  499. X#option bad_telnet # use this flag when a telnet session is not terminating
  500. X#
  501. X# IMPORTANT NOTE:
  502. X#
  503. X# listserv also recognizes the requests 'restart' and 'shutdown' followed by
  504. X# a password, that can be used to remotely restart and shutdown the server
  505. X# system. The password is defined in the 'config' file using the 'password'
  506. X# directive followed by the actual password.
  507. X# This feature is not documented in the man page for obvious reasons.
  508. END_OF_FILE
  509. if test 3105 -ne `wc -c <'config'`; then
  510.     echo shar: \"'config'\" unpacked with wrong size!
  511. fi
  512. # end of 'config'
  513. fi
  514. if test ! -d 'doc' ; then
  515.     echo shar: Creating directory \"'doc'\"
  516.     mkdir 'doc'
  517. fi
  518. if test -f 'doc/README' -a "${1}" != "-c" ; then 
  519.   echo shar: Will not clobber existing file \"'doc/README'\"
  520. else
  521. echo shar: Extracting \"'doc/README'\" \(756 characters\)
  522. sed "s/^X//" >'doc/README' <<'END_OF_FILE'
  523. X
  524. To install the man pages permanently on your system you will need to do the
  525. following as superuser:
  526. X
  527. X% cp server.nr farch.nr queue.nr /usr/man/cat1 <- or wherever the man pages are
  528. X% cd /usr/man/cat1
  529. X% compress server.nr farch.nr queue.nr
  530. X% mv server.nr.Z server.1
  531. X% mv farch.nr.Z farch.1
  532. X% mv queue.nr.Z queue.1
  533. X% chmod 444 server.1 farch.1 queue.1
  534. X% vi Index <--- if availbable
  535. X  add the following lines in Index in the appropriate alphabetic location:
  536. X    server.1:server:
  537. X    farch.1:farch:
  538. X    queue.1:queue:
  539. X% vi /usr/man/whatis <-- or whatever file is used when doing man -k
  540. X  add the following lines in whatis:
  541. X    server (1)    - discussion list server system
  542. X    farch (1)    - file archiving for list server system
  543. X    queue (1)    - mail queueing for list server system
  544. END_OF_FILE
  545. if test 756 -ne `wc -c <'doc/README'`; then
  546.     echo shar: \"'doc/README'\" unpacked with wrong size!
  547. fi
  548. # end of 'doc/README'
  549. fi
  550. if test -f 'doc/farch.nr' -a "${1}" != "-c" ; then 
  551.   echo shar: Will not clobber existing file \"'doc/farch.nr'\"
  552. else
  553. echo shar: Extracting \"'doc/farch.nr'\" \(4751 characters\)
  554. sed "s/^X//" >'doc/farch.nr' <<'END_OF_FILE'
  555. X
  556. X
  557. X
  558. farch(1)                  USER COMMANDS                  farch(1)
  559. X
  560. X
  561. X
  562. NNNNAAAAMMMMEEEE
  563. X     farch - archive files in /usr/server/archives
  564. X
  565. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  566. X     farch [-n] [-b] [-s size] [-a archive] [-d  dir]  [-t  file]
  567. X     files
  568. X
  569. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  570. X     _f_a_r_c_h is used  to  archive  files  in  /usr/server/archives.
  571. X     Archives  reside under that directory as subdirectories; the
  572. X     default is _l_i_s_t_s_e_r_v, and it  is  also  the  master  archive.
  573. X     Archives are hierarchically structured, and each archive has
  574. X     at least two files in its directory:
  575. X
  576. X     INDEX
  577. X          A list of all subarchives including itself; the  format
  578. X          is  one  line  per archive with the archive's name fol-
  579. X          lowed by the archive's full path.
  580. X
  581. X     DIR  A list of files available from that archive; the format
  582. X          is  one  line per file, followed by the number of parts
  583. X          it may be split into, followed by the full path to  the
  584. X          directory these parts can be found, followed by a short
  585. X          descriptive message about the file (optional).
  586. X
  587. X     The following command line options are recognized:
  588. X
  589. X     -n   Do not split files when archiving them.
  590. X
  591. X     -b   Input files  are  binary;  they  are  uuencoded  before
  592. X          archived.
  593. X
  594. X     -s size
  595. X          Specify the maximum _s_i_z_e in kilobytes of  each  of  the
  596. X          subparts (default is 64).
  597. X
  598. X     -a archive
  599. X          Specify the  _a_r_c_h_i_v_e  that  the  input  files  will  be
  600. X          archived under (default is listserv).
  601. X
  602. X     -d dir
  603. X          Specify the _d_i_rectory that the output files are  to  be
  604. X          placed  (default  is /usr/server/archives/listserv). If
  605. X          the directory does not exist, it will be created.
  606. X
  607. X     -t file
  608. X          Input files are tarred into _f_i_l_e which is then archived
  609. X          (-b flag is automatically turned on).
  610. X
  611. AAAARRRRCCCCHHHHIIIIVVVVIIIINNNNGGGG AAAA FFFFIIIILLLLEEEE
  612. X     _f_a_r_c_h by default splits the input files if necessary (or the
  613. X     tar  file, if any), into files of maximum size as specified.
  614. X
  615. X
  616. X
  617. Anastasios Kotsikonas                                          1
  618. X
  619. X
  620. X
  621. X
  622. X
  623. X
  624. farch(1)                  USER COMMANDS                  farch(1)
  625. X
  626. X
  627. X
  628. X     Each part will contain as many complete lines from the  ori-
  629. X     ginal  input  file as possible, without exceeding the speci-
  630. X     fied size.  Binary  files  are  uuencoded  before  they  are
  631. X     archived,  and  all archived files are compressed, if possi-
  632. X     ble.
  633. X
  634. AAAADDDDDDDDIIIINNNNGGGG AAAA NNNNEEEEWWWW AAAARRRRCCCCHHHHIIIIVVVVEEEE
  635. X     Step 1
  636. X          Create a directory under /usr/server/archives with  the
  637. X          new archive's name.
  638. X
  639. X     Step 2
  640. X          Edit    the     master     archive's     index     file
  641. X          (/usr/server/archives/listserv/INDEX)  and  add the new
  642. X          archive along with its path at the bottom of the  file.
  643. X          The  first  line  of  every  INDEX  file  should be the
  644. X          archive  that  owns  it.   Also  edit  every   ancestor
  645. X          archive's INDEX file, if the new archive is not a child
  646. X          of the default.
  647. X
  648. X     Step 3
  649. X          Create a new INDEX file in the new archive's  directory
  650. X          and put an entry for itself.
  651. X
  652. X     Step 4
  653. X          Create an empty DIR file in the  new  archive's  direc-
  654. X          tory.
  655. X
  656. XEEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  657. X     Archive src/data and src/data2 under listserv, using a  max-
  658. X     imum  file  size of 1K; the output file(s) will be placed in
  659. X     /tmp:
  660. X
  661. X       % farch -s 1 -d /tmp src/data src/data2
  662. X
  663. X     Archive /etc/hosts under archive unix:
  664. X
  665. X       % farch -a unix -d /etc /etc/hosts
  666. X
  667. X     Tar and archive all files in /usr/src:
  668. X
  669. X       % farch -t source /usr/src/*.c
  670. X     Descriptive messages about these files  are  added  manually
  671. X     into the archive's DIR file.
  672. X
  673. RRRREEEESSSSTTTTRRRRIIIICCCCTTTTIIIIOOOONNNNSSSS
  674. X     The input files must use only lower case characters  of  the
  675. X     alphabet.
  676. X
  677. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  678. X     server(1)
  679. X
  680. X
  681. X
  682. X
  683. Anastasios Kotsikonas                                          2
  684. X
  685. X
  686. X
  687. X
  688. X
  689. X
  690. farch(1)                  USER COMMANDS                  farch(1)
  691. X
  692. X
  693. X
  694. AAAAUUUUTTTTHHHHOOOORRRR
  695. X     Anastasios C. Kotsikonas, Boston University.
  696. X     Copyright (c) 1991, Anastasios Kotsikonas
  697. X     Comments to tasos@cs.bu.edu
  698. X
  699. X
  700. X
  701. X
  702. X
  703. X
  704. X
  705. X
  706. X
  707. X
  708. X
  709. X
  710. X
  711. X
  712. X
  713. X
  714. X
  715. X
  716. X
  717. X
  718. X
  719. X
  720. X
  721. X
  722. X
  723. X
  724. X
  725. X
  726. X
  727. X
  728. X
  729. X
  730. X
  731. X
  732. X
  733. X
  734. X
  735. X
  736. X
  737. X
  738. X
  739. X
  740. X
  741. X
  742. X
  743. X
  744. X
  745. X
  746. X
  747. X
  748. X
  749. Anastasios Kotsikonas                                          3
  750. X
  751. X
  752. X
  753. END_OF_FILE
  754. echo shar: 297 control characters may be missing from \"'doc/farch.nr'\"
  755. if test 4751 -ne `wc -c <'doc/farch.nr'`; then
  756.     echo shar: \"'doc/farch.nr'\" unpacked with wrong size!
  757. fi
  758. # end of 'doc/farch.nr'
  759. fi
  760. if test -f 'doc/queue.nr' -a "${1}" != "-c" ; then 
  761.   echo shar: Will not clobber existing file \"'doc/queue.nr'\"
  762. else
  763. echo shar: Extracting \"'doc/queue.nr'\" \(3302 characters\)
  764. sed "s/^X//" >'doc/queue.nr' <<'END_OF_FILE'
  765. X
  766. X
  767. X
  768. queue(1)                  USER COMMANDS                  queue(1)
  769. X
  770. X
  771. X
  772. NNNNAAAAMMMMEEEE
  773. X     queued - mail queue daemon
  774. X
  775. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  776. X     qqqquuuueeeeuuuueeeedddd <ffffrrrreeeeqqqquuuueeeennnnccccyyyy> <mmmmaaaannnnaaaaggggeeeerrrr>
  777. X
  778. NNNNAAAAMMMMEEEE
  779. X     pqueue - process the specified mail queue files
  780. X
  781. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  782. X     ppppqqqquuuueeeeuuuueeee [----eeee] [----DDDD] <ffffiiiilllleeeessss>
  783. X
  784. OOOOVVVVEEEERRRRVVVVIIIIEEEEWWWW
  785. X     This part of the system can be employed only when using  the
  786. X     _s_y_s_t_e_m  mailmethod  (see  _s_e_r_v_e_r(_1)).  Messages and requests
  787. X     not delivered due to network  problems  are  queued  by  the
  788. X     server system in the directory /usr/server/mqueue. This part
  789. X     of the system attempts periodic redelivery of  these  files.
  790. X     If  problems  still persist, files (messages) that cannot be
  791. X     delivered are requeued.
  792. X
  793. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN:::: qqqquuuueeeeuuuueeeedddd
  794. X     This is the daemon that looks for files in the  mail  queue.
  795. X     It  uses  _p_q_u_e_u_e  for redelivery. The queue is checked every
  796. X     _f_r_e_q_u_e_n_c_y seconds. Whenever an  error  occurs  with  _p_q_u_e_u_e,
  797. X     _q_u_e_u_e_d sends a mail message to _m_a_n_a_g_e_r and aborts.
  798. X
  799. X     _q_u_e_u_e_d is not spawned by _s_t_a_r_t in order to reduce the number
  800. X     of  processes  running,  since  the  probability of messages
  801. X     being queued is very low.  Instead,  it  should  be  started
  802. X     manually  whenever  there are files in the mail queue direc-
  803. X     tory.
  804. X
  805. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN:::: ppppqqqquuuueeeeuuuueeee
  806. X     The _f_i_l_e_s given as arguments  are  redelivered.  If  any  of
  807. X     these  cannot  be redelivered, they are requeued and will be
  808. X     processed in the  next  run.  _p_q_u_e_u_e  reports  to  the  file
  809. X     /usr/server/.report.pqueue
  810. X
  811. X     The following command line options are recognized:
  812. X
  813. X     -e   Echo reports to the screen.
  814. X
  815. X     -D   Turns debugging on; a copy of the last SMPT transaction
  816. X          can   be   found  in  the  files  /usr/server/sent  and
  817. X          /usr/server/received. Warning:  these  files  are  also
  818. X          used  by  _l_i_s_t  and _l_i_s_t_s_e_r_v when they have their debug
  819. X          mode on, so use caution.
  820. X
  821. NNNNOOOOTTTTEEEE
  822. X     This mail queuing system should not be confused with the one
  823. X     implemented by sendmail.
  824. X
  825. X
  826. X
  827. Anastasios Kotsikonas                                          1
  828. X
  829. X
  830. X
  831. X
  832. X
  833. X
  834. queue(1)                  USER COMMANDS                  queue(1)
  835. X
  836. X
  837. X
  838. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  839. X     server(1)
  840. X
  841. AAAAUUUUTTTTHHHHOOOORRRR
  842. X     Anastasios C. Kotsikonas, Boston University.
  843. X     Copyright (c) 1991, Anastasios Kotsikonas
  844. X     Comments to tasos@cs.bu.edu
  845. X
  846. X
  847. X
  848. X
  849. X
  850. X
  851. X
  852. X
  853. X
  854. X
  855. X
  856. X
  857. X
  858. X
  859. X
  860. X
  861. X
  862. X
  863. X
  864. X
  865. X
  866. X
  867. X
  868. X
  869. X
  870. X
  871. X
  872. X
  873. X
  874. X
  875. X
  876. X
  877. X
  878. X
  879. X
  880. X
  881. X
  882. X
  883. X
  884. X
  885. X
  886. X
  887. X
  888. X
  889. X
  890. X
  891. X
  892. X
  893. Anastasios Kotsikonas                                          2
  894. X
  895. X
  896. X
  897. END_OF_FILE
  898. echo shar: 447 control characters may be missing from \"'doc/queue.nr'\"
  899. if test 3302 -ne `wc -c <'doc/queue.nr'`; then
  900.     echo shar: \"'doc/queue.nr'\" unpacked with wrong size!
  901. fi
  902. # end of 'doc/queue.nr'
  903. fi
  904. if test -f 'flocks' -a "${1}" != "-c" ; then 
  905.   echo shar: Will not clobber existing file \"'flocks'\"
  906. else
  907. echo shar: Extracting \"'flocks'\" \(102 characters\)
  908. sed "s/^X//" >'flocks' <<'END_OF_FILE'
  909. X#include "/usr/server/src/defs.h"
  910. rm -f SERVERD_LOCK_FILE
  911. rm -f LIST_LOCK_FILE
  912. rm -f SERVER_LOCK_FILE
  913. END_OF_FILE
  914. if test 102 -ne `wc -c <'flocks'`; then
  915.     echo shar: \"'flocks'\" unpacked with wrong size!
  916. fi
  917. # end of 'flocks'
  918. fi
  919. if test ! -d 'help' ; then
  920.     echo shar: Creating directory \"'help'\"
  921.     mkdir 'help'
  922. fi
  923. if test -f 'help/general' -a "${1}" != "-c" ; then 
  924.   echo shar: Will not clobber existing file \"'help/general'\"
  925. else
  926. echo shar: Extracting \"'help/general'\" \(2544 characters\)
  927. sed "s/^X//" >'help/general' <<'END_OF_FILE'
  928. Recognized requests are:
  929. X
  930. X*******************************************************************************
  931. X
  932. help [request]
  933. X--------------
  934. Without arguments, this file. Otherwise get specific information on the
  935. selected topic.
  936. X
  937. X*******************************************************************************
  938. X
  939. set <list> [<option> <value>]
  940. X-----------------------------
  941. Without the optional arguments, get a list of all current settings for
  942. the specified list. Otherwise change the option to the new value for that
  943. list.
  944. X
  945. X*******************************************************************************
  946. X
  947. subscribe <list> <your name>
  948. X----------------------------
  949. The only way to subscribe to a list.
  950. X
  951. X*******************************************************************************
  952. X
  953. unsubscribe <list> (or: signoff <list>)
  954. X---------------------------------------
  955. Remove yourself from the specified list.
  956. X
  957. X*******************************************************************************
  958. X
  959. recipients <list> (or: review <list>)
  960. X-------------------------------------
  961. Get a list of all people subscribed in the specified list.
  962. X
  963. X*******************************************************************************
  964. X
  965. information <list>
  966. X------------------
  967. Get information about the specified list.
  968. X
  969. X*******************************************************************************
  970. X
  971. statistics <list> [subscriber email address(es)]
  972. X------------------------------------------------
  973. Get a list of subscribers along with the number of messages each one
  974. of them has sent to the specified list. If the optional email addresses
  975. are given, then statistics will be collected for these users only.
  976. X
  977. X*******************************************************************************
  978. X
  979. lists
  980. X-----
  981. Get a list of discussion lists that are served by this server.
  982. X
  983. X*******************************************************************************
  984. X
  985. index [archive]
  986. X---------------
  987. Get a list of files in the selected archive, or the master archive if
  988. no archive was specified.
  989. X
  990. X*******************************************************************************
  991. X
  992. get <archive> <file> [parts]
  993. X----------------------------
  994. Get the requested file from the specified archive. Certain subparts may
  995. be obtained by specifying them as optional arguments.
  996. X
  997. X*******************************************************************************
  998. X
  999. release
  1000. X-------
  1001. Get information about the current release of this listserv system.
  1002. X
  1003. X*******************************************************************************
  1004. END_OF_FILE
  1005. if test 2544 -ne `wc -c <'help/general'`; then
  1006.     echo shar: \"'help/general'\" unpacked with wrong size!
  1007. fi
  1008. # end of 'help/general'
  1009. fi
  1010. if test -f 'help/get' -a "${1}" != "-c" ; then 
  1011.   echo shar: Will not clobber existing file \"'help/get'\"
  1012. else
  1013. echo shar: Extracting \"'help/get'\" \(806 characters\)
  1014. sed "s/^X//" >'help/get' <<'END_OF_FILE'
  1015. Syntax: get <archive> <file> [parts]
  1016. X    Get the specified file from the specified archive. The file may
  1017. X    have been split into parts because some mailers cannot send large
  1018. X    files, and in this case you will receive as many messages as the
  1019. X    number of parts the file has been split into. Binary files are
  1020. X    uuencoded, so you will need to combine all the parts sent and
  1021. X    uudecode. The requested file may be a tar file (containing other
  1022. X    files and perhaps directories) in which case when you uudecode,
  1023. X    a tar file will be created and you will need to run the UNIX
  1024. X    utility 'tar' on it to extract the files and directories.
  1025. X
  1026. X    If certain parts are specified, then only these parts (if they exist)
  1027. X    will be sent. The parts are specified as numbers separated by spaces.
  1028. X    You may not specify ranges of parts (e.g. 1-3).
  1029. END_OF_FILE
  1030. if test 806 -ne `wc -c <'help/get'`; then
  1031.     echo shar: \"'help/get'\" unpacked with wrong size!
  1032. fi
  1033. # end of 'help/get'
  1034. fi
  1035. if test -f 'help/index' -a "${1}" != "-c" ; then 
  1036.   echo shar: Will not clobber existing file \"'help/index'\"
  1037. else
  1038. echo shar: Extracting \"'help/index'\" \(292 characters\)
  1039. sed "s/^X//" >'help/index' <<'END_OF_FILE'
  1040. Syntax: index [archive]
  1041. X    Get a list of files for the specified archive, or listserv -- the
  1042. X    master archive, if none given. Files are actually listed for
  1043. X    the requested archive, plus all of its subarchives. Obviously
  1044. X    the master archive will list all of the available files from this
  1045. X    server.
  1046. END_OF_FILE
  1047. if test 292 -ne `wc -c <'help/index'`; then
  1048.     echo shar: \"'help/index'\" unpacked with wrong size!
  1049. fi
  1050. # end of 'help/index'
  1051. fi
  1052. if test -f 'help/information' -a "${1}" != "-c" ; then 
  1053.   echo shar: Will not clobber existing file \"'help/information'\"
  1054. else
  1055. echo shar: Extracting \"'help/information'\" \(159 characters\)
  1056. sed "s/^X//" >'help/information' <<'END_OF_FILE'
  1057. Syntax: information <list>
  1058. X        Get information about the specified list. This usually includes
  1059. X    its purpose and certain restrictions for posting messages.
  1060. END_OF_FILE
  1061. if test 159 -ne `wc -c <'help/information'`; then
  1062.     echo shar: \"'help/information'\" unpacked with wrong size!
  1063. fi
  1064. # end of 'help/information'
  1065. fi
  1066. if test -f 'help/lists' -a "${1}" != "-c" ; then 
  1067.   echo shar: Will not clobber existing file \"'help/lists'\"
  1068. else
  1069. echo shar: Extracting \"'help/lists'\" \(152 characters\)
  1070. sed "s/^X//" >'help/lists' <<'END_OF_FILE'
  1071. Syntax: lists
  1072. X        Get a list of all discussion lists served by this server; the list
  1073. X    consists of email addresses and a brief comment for each one.
  1074. END_OF_FILE
  1075. if test 152 -ne `wc -c <'help/lists'`; then
  1076.     echo shar: \"'help/lists'\" unpacked with wrong size!
  1077. fi
  1078. # end of 'help/lists'
  1079. fi
  1080. if test -f 'help/recipients' -a "${1}" != "-c" ; then 
  1081.   echo shar: Will not clobber existing file \"'help/recipients'\"
  1082. else
  1083. echo shar: Extracting \"'help/recipients'\" \(288 characters\)
  1084. sed "s/^X//" >'help/recipients' <<'END_OF_FILE'
  1085. Syntax: recipients <list> (or: review <list>)
  1086. X        Get a listing of the current subscribers for the specified list;
  1087. X    each person's email address is followed by his/her name. If the list
  1088. X    is linked with any peer lists, your request will be forwarded to
  1089. X    the appropriate server(s) also.
  1090. END_OF_FILE
  1091. if test 288 -ne `wc -c <'help/recipients'`; then
  1092.     echo shar: \"'help/recipients'\" unpacked with wrong size!
  1093. fi
  1094. # end of 'help/recipients'
  1095. fi
  1096. if test -f 'help/release' -a "${1}" != "-c" ; then 
  1097.   echo shar: Will not clobber existing file \"'help/release'\"
  1098. else
  1099. echo shar: Extracting \"'help/release'\" \(84 characters\)
  1100. sed "s/^X//" >'help/release' <<'END_OF_FILE'
  1101. Syntax: release
  1102. X    Get information about the current release of this listserv system.
  1103. END_OF_FILE
  1104. if test 84 -ne `wc -c <'help/release'`; then
  1105.     echo shar: \"'help/release'\" unpacked with wrong size!
  1106. fi
  1107. # end of 'help/release'
  1108. fi
  1109. if test -f 'help/set' -a "${1}" != "-c" ; then 
  1110.   echo shar: Will not clobber existing file \"'help/set'\"
  1111. else
  1112. echo shar: Extracting \"'help/set'\" \(590 characters\)
  1113. sed "s/^X//" >'help/set' <<'END_OF_FILE'
  1114. Syntax: set <list> [<option> <value>]
  1115. X    Without the optional arguments, get a list of all current settings for
  1116. X    the specified list. Otherwise change the option to the new value for
  1117. X    that list, as follows:
  1118. X
  1119. X        option can be: mail
  1120. X        value can be: ack, noack, postpone
  1121. X
  1122. X        'set <list>': get the current option settings for the list
  1123. X        'set <list> mail ack': your message is sent back to you
  1124. X        'set <list> mail noack': your message is not sent back to you
  1125. X        'set <list> mail postpone': no messages will be sent to you until you
  1126. X                change mode again
  1127. END_OF_FILE
  1128. if test 590 -ne `wc -c <'help/set'`; then
  1129.     echo shar: \"'help/set'\" unpacked with wrong size!
  1130. fi
  1131. # end of 'help/set'
  1132. fi
  1133. if test -f 'help/statistics' -a "${1}" != "-c" ; then 
  1134.   echo shar: Will not clobber existing file \"'help/statistics'\"
  1135. else
  1136. echo shar: Extracting \"'help/statistics'\" \(473 characters\)
  1137. sed "s/^X//" >'help/statistics' <<'END_OF_FILE'
  1138. Syntax: statistics <list> [subscriber email address(es)]
  1139. X        Get statistical information for all subscribers, or for the specified
  1140. X        one(s) only, in the specified list. Each email address is followed
  1141. X    by a count of the number of messages sent to this list by this user
  1142. X    to date. Wild characters are allowed when inquiring about specific
  1143. X    subscribers. If the list is linked with other peer lists, your request
  1144. X    will be forwarded to the appropriate server(s) also.
  1145. END_OF_FILE
  1146. if test 473 -ne `wc -c <'help/statistics'`; then
  1147.     echo shar: \"'help/statistics'\" unpacked with wrong size!
  1148. fi
  1149. # end of 'help/statistics'
  1150. fi
  1151. if test -f 'help/subscribe' -a "${1}" != "-c" ; then 
  1152.   echo shar: Will not clobber existing file \"'help/subscribe'\"
  1153. else
  1154. echo shar: Extracting \"'help/subscribe'\" \(140 characters\)
  1155. sed "s/^X//" >'help/subscribe' <<'END_OF_FILE'
  1156. Syntax: subscribe <list> <your full name>
  1157. X        The only way to subscribe to a list. Any extraneous characters in
  1158. X    your name are removed.
  1159. END_OF_FILE
  1160. if test 140 -ne `wc -c <'help/subscribe'`; then
  1161.     echo shar: \"'help/subscribe'\" unpacked with wrong size!
  1162. fi
  1163. # end of 'help/subscribe'
  1164. fi
  1165. if test -f 'help/unsubscribe' -a "${1}" != "-c" ; then 
  1166.   echo shar: Will not clobber existing file \"'help/unsubscribe'\"
  1167. else
  1168. echo shar: Extracting \"'help/unsubscribe'\" \(85 characters\)
  1169. sed "s/^X//" >'help/unsubscribe' <<'END_OF_FILE'
  1170. Syntax: unsubscribe <list> (or: signoff <list>)
  1171. X        Remove yourself from a list.
  1172. END_OF_FILE
  1173. if test 85 -ne `wc -c <'help/unsubscribe'`; then
  1174.     echo shar: \"'help/unsubscribe'\" unpacked with wrong size!
  1175. fi
  1176. # end of 'help/unsubscribe'
  1177. fi
  1178. if test -f 'news' -a "${1}" != "-c" ; then 
  1179.   echo shar: Will not clobber existing file \"'news'\"
  1180. else
  1181. echo shar: Extracting \"'news'\" \(1891 characters\)
  1182. sed "s/^X//" >'news' <<'END_OF_FILE'
  1183. X#!/bin/sh
  1184. X# Shell script to add a news group to a discussion list.
  1185. X#
  1186. X# Usage: news <LIST_ALIAS> <news group> <news email address> <news mode>
  1187. X#
  1188. X# where:
  1189. X# LIST_ALIAS: a local list alias, capitalized, that is to be connected to
  1190. X#  the news group.
  1191. X# news group: the news group name (e.g. alt.sex)
  1192. X# news email address: full email address of the news source.
  1193. X# news mode: "receive" if the local list will only be receiving articles,
  1194. X#  or "send_receive" if the local list will post to the news group as
  1195. X#  well.
  1196. X
  1197. PROG=`basename $0`
  1198. if [ $# -lt 4 ]; then
  1199. X  echo Usage: $PROG \<LIST_ALIAS\> \<news group\> \<$PROG email address\> \<$PROG mode\>
  1200. X  exit 1
  1201. fi
  1202. X
  1203. ARGS=$PROG\ $*
  1204. DIR=/usr/server/lists/`echo $1 | tr '[a-z]' '[A-Z]'`
  1205. REPORT=/usr/server/.report.server
  1206. CONFIG=/usr/server/config
  1207. XFILE=$DIR/.news
  1208. GROUP=`echo $2 | tr '[A-Z]' '[a-z]'`
  1209. XEMAIL=`echo $3 | tr '[A-Z]' '[a-z]'`
  1210. shift; shift; shift
  1211. X
  1212. if [ ! -d $DIR ]; then
  1213. X  echo $DIR: no such list
  1214. X  exit 2
  1215. fi
  1216. if [ ! -r $CONFIG ]; then
  1217. X  echo Cannot open $CONFIG
  1218. X  exit 2
  1219. fi
  1220. if [ ! -r $FILE ]; then
  1221. X  echo Cannot open $FILE
  1222. X  exit 2
  1223. fi
  1224. if [ "$1" = "receive" ]; then
  1225. X  MODE=POSTPONE
  1226. elif [ "$1" = "send_receive" ]; then
  1227. X  MODE=NOACK
  1228. else
  1229. X  echo Token $1 not recognized
  1230. X  exit 2
  1231. fi
  1232. X
  1233. echo >> $REPORT
  1234. echo --- NEW MAIL HAS ARRIVED --- >> $REPORT
  1235. echo $ARGS >> $REPORT
  1236. LOCAL=`grep -i "^list *$REMOTE_ALIAS *$EMAIL" $CONFIG | awk '{ print $2 }'`
  1237. if [ "$LOCAL" = "" ]; then
  1238. X  LOCAL=`grep -i "^server\  *$EMAIL" $CONFIG | awk '{ print $2 }'`
  1239. X  txt=server
  1240. else
  1241. X  txt=list
  1242. fi
  1243. if [ "$LOCAL" != "" ]; then
  1244. X  echo Cannot add local $txt $LOCAL as $PROG to $FILE >&1 | tee -a $REPORT
  1245. else
  1246. X  if [ "`grep -i $EMAIL $FILE`" != "" ] || [ "`grep -i $GROUP $FILE`" != "" ]
  1247. X  then
  1248. X    echo $EMAIL\: Already subscribed as a $PROG group in $FILE >&1 | \
  1249. X         tee -a $REPORT
  1250. X  else
  1251. X    echo $EMAIL $MODE $GROUP >> $FILE
  1252. X  fi
  1253. fi
  1254. echo Time/Date: `date` >> $REPORT
  1255. exit 0
  1256. END_OF_FILE
  1257. if test 1891 -ne `wc -c <'news'`; then
  1258.     echo shar: \"'news'\" unpacked with wrong size!
  1259. fi
  1260. # end of 'news'
  1261. fi
  1262. if test -f 'peer' -a "${1}" != "-c" ; then 
  1263.   echo shar: Will not clobber existing file \"'peer'\"
  1264. else
  1265. echo shar: Extracting \"'peer'\" \(1838 characters\)
  1266. sed "s/^X//" >'peer' <<'END_OF_FILE'
  1267. X#!/bin/sh
  1268. X# Shell script to add a peer list to a discussion list. 
  1269. X#
  1270. X# Usage: peer <LIST_ALIAS> <remote alias> <remote peer email address> 
  1271. X#          <remote peer listserv email address>
  1272. X# where:
  1273. X# LIST_ALIAS: a local list alias, capitalized, that is to be connected to
  1274. X#  the new peer.
  1275. X# remote alias: the peer's list alias on the remote machine
  1276. X# remote peer email address: full email address of the peer list to be added
  1277. X# remote peer listserv email address: full email address of the server
  1278. X#   that handles the remote peer.
  1279. X
  1280. PROG=`basename $0`
  1281. if [ $# -lt 4 ]; then
  1282. X  echo Usage: $PROG \<LIST_ALIAS\> \<remote alias\> \
  1283. X\<remote $PROG email address\> \<remote $PROG listserv email address\>
  1284. X  exit 1
  1285. fi
  1286. X
  1287. ARGS=$PROG\ $*
  1288. DIR=/usr/server/lists/`echo $1 | tr '[a-z]' '[A-Z]'`
  1289. REMOTE_ALIAS=`echo $2 | tr '[A-Z]' '[a-z]'`
  1290. XEMAIL=`echo $3 | tr '[A-Z]' '[a-z]'`
  1291. REMOTE_SERVER=`echo $4 | tr '[A-Z]' '[a-z]'`
  1292. REPORT=/usr/server/.report.server
  1293. CONFIG=/usr/server/config
  1294. MODE=NOACK
  1295. XFILE=$DIR/.peers
  1296. shift; shift; shift; shift
  1297. X
  1298. if [ ! -d $DIR ]; then
  1299. X  echo $DIR: no such list
  1300. X  exit 2
  1301. fi
  1302. if [ ! -r $CONFIG ]; then
  1303. X  echo Cannot open $CONFIG
  1304. X  exit 2
  1305. fi
  1306. if [ ! -r $FILE ]; then
  1307. X  echo Cannot open $FILE
  1308. X  exit 2
  1309. fi
  1310. X
  1311. echo >> $REPORT
  1312. echo --- NEW MAIL HAS ARRIVED --- >> $REPORT
  1313. echo $ARGS >> $REPORT
  1314. LOCAL=`grep -i "^list *$REMOTE_ALIAS *$EMAIL" $CONFIG | awk '{ print $2 }'`
  1315. if [ "$LOCAL" = "" ]; then
  1316. X  LOCAL=`grep -i "^server\  *$EMAIL" $CONFIG | awk '{ print $2 }'`
  1317. X  txt=server
  1318. else
  1319. X  txt=list
  1320. fi
  1321. if [ "$LOCAL" != "" ]; then
  1322. X  echo Cannot add local $txt $LOCAL as $PROG to $FILE >&1 | tee -a $REPORT
  1323. else
  1324. X  if [ "`grep -i $EMAIL $FILE`" != "" ]; then
  1325. X    echo $EMAIL\: Already subscribed as a $PROG in $FILE >&1 | tee -a $REPORT
  1326. X  else
  1327. X    echo $EMAIL $MODE $REMOTE_ALIAS $REMOTE_SERVER >> $FILE
  1328. X  fi
  1329. fi
  1330. echo Time/Date: `date` >> $REPORT
  1331. exit 0
  1332. END_OF_FILE
  1333. if test 1838 -ne `wc -c <'peer'`; then
  1334.     echo shar: \"'peer'\" unpacked with wrong size!
  1335. fi
  1336. # end of 'peer'
  1337. fi
  1338. if test -f 'queued' -a "${1}" != "-c" ; then 
  1339.   echo shar: Will not clobber existing file \"'queued'\"
  1340. else
  1341. echo shar: Extracting \"'queued'\" \(703 characters\)
  1342. sed "s/^X//" >'queued' <<'END_OF_FILE'
  1343. X#!/bin/sh
  1344. X# queued <frequency> <manager>
  1345. X# Daemon to process the mail queue periodically. The frequency is given
  1346. X# in seconds.
  1347. X
  1348. if [ $# -ne 2 ]; then
  1349. X  echo Usage: `basename $0` \<frequency\> \<manager\>
  1350. X  exit 3
  1351. fi
  1352. DIR=/usr/server/mqueue
  1353. XFREQ=$1
  1354. MANAGER=$2
  1355. shift; shift
  1356. if [ ! -d $DIR ]; then
  1357. X  echo $DIR directory missing
  1358. X  exit 3
  1359. fi
  1360. cd $DIR
  1361. PWD=`pwd`
  1362. while [ 007 ]; do
  1363. X  for i in `\ls`
  1364. X  do
  1365. X    if [ ! -r /usr/server/pqueue ]; then
  1366. X      echo queued aborts: pqueue not found | /bin/rmail $MANAGER
  1367. X      exit 1
  1368. X    fi
  1369. X    /usr/server/pqueue -e $PWD/$i
  1370. X    if [ $? -gt 0 ]; then
  1371. X      echo queued aborts: pqueue exit status $? | /bin/rmail $MANAGER
  1372. X      exit 1
  1373. X    fi
  1374. X  done
  1375. X  sleep $FREQ
  1376. done
  1377. exit 0
  1378. END_OF_FILE
  1379. if test 703 -ne `wc -c <'queued'`; then
  1380.     echo shar: \"'queued'\" unpacked with wrong size!
  1381. fi
  1382. # end of 'queued'
  1383. fi
  1384. if test -f 'redux' -a "${1}" != "-c" ; then 
  1385.   echo shar: Will not clobber existing file \"'redux'\"
  1386. else
  1387. echo shar: Extracting \"'redux'\" \(494 characters\)
  1388. sed "s/^X//" >'redux' <<'END_OF_FILE'
  1389. X#!/bin/sh
  1390. X# Script to reduce the size of mboxes by removing unnecessary fields in
  1391. X# the header of each message.
  1392. X# Usage: redux [mbox-file] (default is ./mbox)
  1393. X
  1394. XFILE=$1
  1395. if [ $# = 0 ]; then
  1396. X  FILE=./mbox
  1397. fi
  1398. if [ ! -r $FILE ]; then
  1399. X  echo File $FILE not found.
  1400. X  exit
  1401. fi
  1402. echo Reducing $FILE\; reduced file in /tmp/reduced >&2
  1403. X/usr/bin/egrep -v "^Cc: |^          with BSMTP;|^Received: |^Status: |^Message-Id: |^Comment: |^Reply-To: |^Sender: |^To: |^Return-Path: |^    id " $FILE > /tmp/reduced
  1404. exit
  1405. END_OF_FILE
  1406. if test 494 -ne `wc -c <'redux'`; then
  1407.     echo shar: \"'redux'\" unpacked with wrong size!
  1408. fi
  1409. # end of 'redux'
  1410. fi
  1411. if test -f 'reformat' -a "${1}" != "-c" ; then 
  1412.   echo shar: Will not clobber existing file \"'reformat'\"
  1413. else
  1414. echo shar: Extracting \"'reformat'\" \(358 characters\)
  1415. sed "s/^X//" >'reformat' <<'END_OF_FILE'
  1416. X#!/bin/sh
  1417. X# This script reformats incoming messages; mailers are supposed to convert
  1418. X# any message text starting with "From " to ">From ", but some fail to do it.
  1419. X# This script should be used instead in the aliases file. For example:
  1420. X#
  1421. X#test-list:"|/bin/cat | /usr/server/reformat >> /usr/server/lists/TEST-LIST/mail
  1422. read x
  1423. echo $x
  1424. sed 's/^From\ /\>From\ /'
  1425. END_OF_FILE
  1426. if test 358 -ne `wc -c <'reformat'`; then
  1427.     echo shar: \"'reformat'\" unpacked with wrong size!
  1428. fi
  1429. # end of 'reformat'
  1430. fi
  1431. if test -f 'setup' -a "${1}" != "-c" ; then 
  1432.   echo shar: Will not clobber existing file \"'setup'\"
  1433. else
  1434. echo shar: Extracting \"'setup'\" \(992 characters\)
  1435. sed "s/^X//" >'setup' <<'END_OF_FILE'
  1436. X#!/bin/sh
  1437. cd /usr/server
  1438. if [ ! -d lists ]; then
  1439. X  echo Creating directory `pwd`/lists
  1440. X  mkdir lists
  1441. fi
  1442. if [ ! -d mqueue ]; then
  1443. X  echo Creating directory `pwd`/mqueue
  1444. X  mkdir mqueue
  1445. fi
  1446. cd src
  1447. make
  1448. make install
  1449. cd ..
  1450. if [ ! -r start ]; then
  1451. X  echo start not found
  1452. X  exit 2
  1453. fi
  1454. if [ ! -r serverd ]; then
  1455. X  echo serverd not found
  1456. X  exit 2
  1457. fi
  1458. if [ ! -r list ]; then
  1459. X  echo list not found
  1460. X  exit 2
  1461. fi
  1462. if [ ! -r listserv ]; then
  1463. X  echo listserv not found
  1464. X  exit 2
  1465. fi
  1466. if [ ! -r config ]; then
  1467. X  echo config not found
  1468. X  exit 2
  1469. fi
  1470. if [ ! -r .awk ]; then
  1471. X  echo .awk not found
  1472. X  exit 2
  1473. fi
  1474. if [ ! -r .stats ]; then
  1475. X  echo .stats not found
  1476. X  exit 2
  1477. fi
  1478. if [ ! -r .grep ]; then
  1479. X  echo .grep not found
  1480. X  exit 2
  1481. fi
  1482. if [ ! -r .ignored ]; then
  1483. X  echo .ignored not found
  1484. X  exit 2
  1485. fi
  1486. touch requests
  1487. chmod 700 start serverd list listserv .awk .stats .grep ulock redux \
  1488. peer news stds queued
  1489. chmod 755 reformat
  1490. chmod 733 .
  1491. chmod 711 lists
  1492. chmod 600 config
  1493. chmod 666 requests
  1494. echo List Server System ready.
  1495. exit 0
  1496. END_OF_FILE
  1497. if test 992 -ne `wc -c <'setup'`; then
  1498.     echo shar: \"'setup'\" unpacked with wrong size!
  1499. fi
  1500. chmod +x 'setup'
  1501. # end of 'setup'
  1502. fi
  1503. if test ! -d 'src' ; then
  1504.     echo shar: Creating directory \"'src'\"
  1505.     mkdir 'src'
  1506. fi
  1507. if test -f 'src/Makefile' -a "${1}" != "-c" ; then 
  1508.   echo shar: Will not clobber existing file \"'src/Makefile'\"
  1509. else
  1510. echo shar: Extracting \"'src/Makefile'\" \(2146 characters\)
  1511. sed "s/^X//" >'src/Makefile' <<'END_OF_FILE'
  1512. X#
  1513. X# Makefile for listserv
  1514. X#
  1515. X# See the README file and the bottom of ../doc/server.nr for machine-specific
  1516. X# instructions on compiling and installing this program.
  1517. X#
  1518. X# If you wish to use an ANSI C compiler and preprocessor, you will have
  1519. X# to do the following first:
  1520. X# % ../stds *.[ch]
  1521. X#
  1522. X
  1523. SHELL        = /bin/sh
  1524. HOMEDIR         = /usr/server
  1525. CC              = cc
  1526. CPP             = /lib/cpp
  1527. CFLAGS          = -g
  1528. LDFLAGS         = -g
  1529. X
  1530. ARCHIVED        = signals.o sender.o misc.o sysmail.o
  1531. ARCHIVE_LIB     = libserver.a
  1532. TARGETS         = listserv list serverd start tlock farch pqueue
  1533. X
  1534. all: $(ARCHIVE_LIB) $(TARGETS)
  1535. X
  1536. X$(ARCHIVE_LIB): $(ARCHIVED)
  1537. X    @rm -f $(ARCHIVE_LIB)
  1538. X    ar cr $(ARCHIVE_LIB) $(ARCHIVED)
  1539. X    @if [ -f /usr/bin/ranlib -o -f /bin/ranlib ]; then \
  1540. X      echo ranlib $(ARCHIVE_LIB); \
  1541. X      ranlib $(ARCHIVE_LIB);\
  1542. X    else\
  1543. X      echo ar ts $(ARCHIVE_LIB); \
  1544. X      ar ts $(ARCHIVE_LIB); \
  1545. X    fi
  1546. X
  1547. listserv: listserv.o $(ARCHIVE_LIB)
  1548. X    $(CC) $(LDFLAGS) $@.o $(ARCHIVE_LIB) -o $@ -lm
  1549. X
  1550. list: list.o $(ARCHIVE_LIB)
  1551. X    $(CC) $(LDFLAGS) $@.o $(ARCHIVE_LIB) -o $@
  1552. X
  1553. serverd: serverd.o $(ARCHIVE_LIB)
  1554. X    $(CC) $(LDFLAGS) $@.o $(ARCHIVE_LIB) -o $@ -lm
  1555. X
  1556. start: start.o $(ARCHIVE_LIB)
  1557. X    $(CC) $(LDFLAGS) $@.o $(ARCHIVE_LIB) -o $@
  1558. X
  1559. tlock: tlock.o $(ARCHIVE_LIB)
  1560. X    $(CC) $(LDFLAGS) $@.o $(ARCHIVE_LIB) -o $@
  1561. X
  1562. farch: farch.o $(ARCHIVE_LIB)
  1563. X    $(CC) $(LDFLAGS) $@.o $(ARCHIVE_LIB) -o $@
  1564. X
  1565. pqueue: pqueue.o $(ARCHIVE_LIB)
  1566. X    $(CC) $(LDFLAGS) $@.o $(ARCHIVE_LIB) -o $@
  1567. X
  1568. install: $(ARCHIVE_LIB) $(TARGETS) $(HOMEDIR)
  1569. X    @for t in $(TARGETS); do \
  1570. X      echo Installing "$$t"; \
  1571. X      rm -f $(HOMEDIR)/"$$t"; \
  1572. X      cp "$$t" $(HOMEDIR); \
  1573. X    done
  1574. X
  1575. X$(HOMEDIR):
  1576. X    mkdir $(HOMEDIR)
  1577. X
  1578. clean:
  1579. X    rm -f $(TARGETS) $(ARCHIVE_LIB) *.o
  1580. X
  1581. X# Hand-generated dependencies
  1582. listserv.o:     defs.h struct.h global.h listserv.h
  1583. X
  1584. list.o:         defs.h struct.h global.h list.h
  1585. X
  1586. serverd.o:      defs.h struct.h global.h serverd.h
  1587. X
  1588. start.o:        defs.h struct.h global.h start.h
  1589. X
  1590. sender.o:       defs.h
  1591. X
  1592. signals.o:      defs.h struct.h
  1593. X
  1594. sysmail.o:      defs.h struct.h sysmail.h
  1595. X
  1596. misc.o:         defs.h struct.h
  1597. X
  1598. tlock.o:        defs.h
  1599. X
  1600. farch.o:        defs.h struct.h listserv.h
  1601. X
  1602. pqueue.o:       defs.h struct.h global.h pqueue.h
  1603. END_OF_FILE
  1604. if test 2146 -ne `wc -c <'src/Makefile'`; then
  1605.     echo shar: \"'src/Makefile'\" unpacked with wrong size!
  1606. fi
  1607. # end of 'src/Makefile'
  1608. fi
  1609. if test -f 'src/REGISTRATION' -a "${1}" != "-c" ; then 
  1610.   echo shar: Will not clobber existing file \"'src/REGISTRATION'\"
  1611. else
  1612. echo shar: Extracting \"'src/REGISTRATION'\" \(468 characters\)
  1613. sed "s/^X//" >'src/REGISTRATION' <<'END_OF_FILE'
  1614. X
  1615. X          DISCUSSION LIST SERVER SYSTEM
  1616. X          -----------------------------
  1617. X
  1618. X            Copy Registration
  1619. X
  1620. X             tasos@cs.bu.edu
  1621. X
  1622. Keep an eye on the anonymous ftp site cs.bu.edu (128.197.10.1) for any
  1623. updates, in the directory pub/listserv
  1624. X
  1625. If you use this software and have not filled out a registration form before,
  1626. please email me the following information:
  1627. X
  1628. Name:
  1629. XEmail address:
  1630. Organization:
  1631. Address:
  1632. Phone:
  1633. Type of computer system:
  1634. Version of server using (% list -v):
  1635. Comments:
  1636. END_OF_FILE
  1637. if test 468 -ne `wc -c <'src/REGISTRATION'`; then
  1638.     echo shar: \"'src/REGISTRATION'\" unpacked with wrong size!
  1639. fi
  1640. # end of 'src/REGISTRATION'
  1641. fi
  1642. if test -f 'src/global.h' -a "${1}" != "-c" ; then 
  1643.   echo shar: Will not clobber existing file \"'src/global.h'\"
  1644. else
  1645. echo shar: Extracting \"'src/global.h'\" \(1141 characters\)
  1646. sed "s/^X//" >'src/global.h' <<'END_OF_FILE'
  1647. X/*
  1648. X  AGREEMENT: This software can be used and distributed freely as long
  1649. X  as you do not remove or alter the Copyright notice in the file defs.h;
  1650. X  this notice is #define'd in the symbol VERSION. Although you may alter
  1651. X  the code provided, you may not alter the functions create_header()
  1652. X  and create_multi_recipient_header() in list.c and listserv.c.
  1653. X  By using this software you are bound by this agreement.
  1654. X  This software comes with no warranties and cannot be sold for profit.
  1655. X  The AGREEMENT and COPYRIGHT notices should be included in all source
  1656. X  files when distributing this software.
  1657. X  COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas
  1658. X*/
  1659. X
  1660. char subscribersf [MAX_LINE];
  1661. char newsf [MAX_LINE];
  1662. char peersf [MAX_LINE];
  1663. char aliasesf [MAX_LINE];
  1664. char headersf [MAX_LINE];
  1665. char restrictedf [MAX_LINE];
  1666. char ignoredf [MAX_LINE];
  1667. char list_mail_f [MAX_LINE];
  1668. char report_listf [MAX_LINE];
  1669. char server_ignoredf [MAX_LINE];
  1670. char infof [MAX_LINE];
  1671. char welcomef [MAX_LINE];
  1672. char message_idsf [MAX_LINE];
  1673. char message_id [MAX_LINE];
  1674. SYS  sys;
  1675. COMMANDS commands [MAX_COMMANDS]; /* Set of recognizable commands */
  1676. BOOLEAN debug = FALSE;
  1677. END_OF_FILE
  1678. if test 1141 -ne `wc -c <'src/global.h'`; then
  1679.     echo shar: \"'src/global.h'\" unpacked with wrong size!
  1680. fi
  1681. # end of 'src/global.h'
  1682. fi
  1683. if test -f 'src/list.h' -a "${1}" != "-c" ; then 
  1684.   echo shar: Will not clobber existing file \"'src/list.h'\"
  1685. else
  1686. echo shar: Extracting \"'src/list.h'\" \(2870 characters\)
  1687. sed "s/^X//" >'src/list.h' <<'END_OF_FILE'
  1688. X/* 
  1689. X  AGREEMENT: This software can be used and distributed freely as long
  1690. X  as you do not remove or alter the Copyright notice in the file defs.h;
  1691. X  this notice is #define'd in the symbol VERSION. Although you may alter
  1692. X  the code provided, you may not alter the functions create_header()
  1693. X  and create_multi_recipient_header() in list.c and listserv.c.
  1694. X  By using this software you are bound by this agreement.
  1695. X  This software comes with no warranties and cannot be sold for profit.
  1696. X  The AGREEMENT and COPYRIGHT notices should be included in all source
  1697. X  files when distributing this software.
  1698. X  COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas
  1699. X
  1700. X  Below are the #define's pertinent to list.c
  1701. X
  1702. X  Preserve any quotes and new lines that appear below; change only path names.
  1703. X
  1704. X  ALWAYS SPECIFY ABSOLUTE PATHS.
  1705. X
  1706. X*/
  1707. X
  1708. X#define MAIL_COPY         ".messages"
  1709. X#define MSG               ".msg"
  1710. X#define MAILFORWARD       ".mailforward"
  1711. X#define MSG_NO            ".msgno"
  1712. X#define MBOX              "mbox"            /* place to save list's messages */
  1713. X#define FROM              "From: " /* Keep this line and the following from */
  1714. X#define ORIGIN          "Originator: "
  1715. X#define REPLY_TO      "Reply-To: "
  1716. X#define NO_RECIPIENT_FILE "NONE"
  1717. X
  1718. X#define PREPEND(str, buf) \
  1719. X  { char copy [1024];\
  1720. X    RESET (copy);\
  1721. X    strcat (copy, buf);\
  1722. X    sprintf (buf, "%s%s", str, copy);\
  1723. X  }
  1724. X
  1725. char mboxf [MAX_LINE];
  1726. char msg_nof [MAX_LINE];
  1727. char mailforwardf [MAX_LINE];
  1728. char msgf [MAX_LINE];
  1729. char mail_copyf [MAX_LINE];
  1730. char list_moderated_f [MAX_LINE];
  1731. char **multi_recipients;  /* List of multiple recipient addresses */
  1732. char *list_alias  = NULL; /* arg to the -L command option */
  1733. X
  1734. XFILE *mail        = NULL; /* Source of messages */
  1735. XFILE *report      = NULL; /* Progress report to the administrator */
  1736. XFILE *subscribers = NULL; /* List of subscribers */
  1737. XFILE *news      = NULL; /* List of newsgroups */
  1738. XFILE *peers      = NULL; /* List of peers */
  1739. XFILE *restricted  = NULL; /* List of people whose messages require special
  1740. X                              handling */
  1741. XFILE *ignored     = NULL; /* List of people whose messages are ignored */
  1742. XFILE *msg_no      = NULL; /* Last message count */
  1743. XFILE *headers     = NULL; /* File containing headers of messages only */
  1744. XFILE *message_ids = NULL; /* File containing message ids */
  1745. X
  1746. BOOLEAN tty_echo        = FALSE;/* -e option off */
  1747. BOOLEAN send_to_subscribers = TRUE; /* -r option off */
  1748. BOOLEAN execute_once        = FALSE;/* -1 option off */
  1749. BOOLEAN errors_to_manager   = FALSE;/* -f option off */
  1750. BOOLEAN multi_recip        = FALSE;/* -m option off */
  1751. BOOLEAN do_not_check_subscriptions = FALSE;/* -s option off */
  1752. BOOLEAN article_replies_to_author  = FALSE;/* -p option off */
  1753. int     returned_msg = 0;           /* Counts the invalid messages */
  1754. int     public_msg = 0;             /* Counts the public messages */
  1755. int     listid = -1;
  1756. int    maxrecipients = 0;
  1757. END_OF_FILE
  1758. if test 2870 -ne `wc -c <'src/list.h'`; then
  1759.     echo shar: \"'src/list.h'\" unpacked with wrong size!
  1760. fi
  1761. # end of 'src/list.h'
  1762. fi
  1763. if test -f 'src/listserv.h' -a "${1}" != "-c" ; then 
  1764.   echo shar: Will not clobber existing file \"'src/listserv.h'\"
  1765. else
  1766. echo shar: Extracting \"'src/listserv.h'\" \(4151 characters\)
  1767. sed "s/^X//" >'src/listserv.h' <<'END_OF_FILE'
  1768. X/*
  1769. X  AGREEMENT: This software can be used and distributed freely as long
  1770. X  as you do not remove or alter the Copyright notice in the file defs.h;
  1771. X  this notice is #define'd in the symbol VERSION. Although you may alter
  1772. X  the code provided, you may not alter the functions create_header()
  1773. X  and create_multi_recipient_header() in list.c and listserv.c.
  1774. X  By using this software you are bound by this agreement.
  1775. X  This software comes with no warranties and cannot be sold for profit.
  1776. X  The AGREEMENT and COPYRIGHT notices should be included in all source
  1777. X  files when distributing this software.
  1778. X  COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas
  1779. X
  1780. X  Below are the #define's pertinent to listserv.c
  1781. X
  1782. X  Preserve any quotes and new lines that appear below; change only path names.
  1783. X
  1784. X  ALWAYS SPECIFY ABSOLUTE PATHS.
  1785. X
  1786. X*/
  1787. X
  1788. X#define UPDATE_DATE      "December 9, 1991"
  1789. X#define MAIL_COPY         PATH/.messages"
  1790. X#define OLD_SUBSCRIBERS   PATH/.oldsubscribers"
  1791. X#define MAILFORWARD       PATH/.mailforward"
  1792. X#define MSG_NO            PATH/.msgno"
  1793. X#define RECIP_FILE      ".recip"
  1794. X#define AWK_PROG      PATH/.awk"
  1795. X#define STATS_PROG      PATH/.stats"
  1796. X#define SERVER_MBOX       PATH/mbox"    /* place to save server's messages */
  1797. X#define STATS_FILE        "/tmp/stats"
  1798. X#define USERS_FILE      "/tmp/users"
  1799. X#define HELP_GENERAL      PATH/help/general"
  1800. X#define HELP_SET      PATH/help/set"
  1801. X#define HELP_SUBSCRIBE      PATH/help/subscribe"
  1802. X#define HELP_UNSUBSCRIBE  PATH/help/unsubscribe"
  1803. X#define HELP_RECIPIENTS      PATH/help/recipients"
  1804. X#define HELP_INFORMATION  PATH/help/information"
  1805. X#define HELP_STATISTICS      PATH/help/statistics"
  1806. X#define HELP_LISTS      PATH/help/lists"
  1807. X#define HELP_INDEX      PATH/help/index"
  1808. X#define HELP_GET      PATH/help/get"
  1809. X#define HELP_RELEASE      PATH/help/release"
  1810. X#define ARCHIVE_DIR      PATH/archives"
  1811. X#define DEFAULT_ARCHIVE      "listserv"
  1812. X#define INDEX          "INDEX"
  1813. X#define DIR          "DIR"
  1814. X#define PEER_SERVER_REQUEST "Peer Server Request: "
  1815. X#define START_OF_SIGNATURE "--"
  1816. X#define MAX_SET_OPTIONS      1 
  1817. X
  1818. X#define DELIVER_MAIL(recipient) \
  1819. X  if (sys.options & USE_SYSMAIL) \
  1820. X    sysmail (MAILFORWARD); \
  1821. X  else \
  1822. X    syscom ("%s %s < %s", sys.mail.method, \
  1823. X            (((sys.options & USE_TELNET) == 0) ? locase (recipient) : ""), \
  1824. X            MAILFORWARD)
  1825. X
  1826. X#define APPEND_TELNET(func) \
  1827. X  if (sys.options & USE_TELNET) {\
  1828. X    if ((f = fopen (MAILFORWARD, "a")) == NULL)\
  1829. X      sprintf (error, "%s(): Could not open %s", func, MAILFORWARD),\
  1830. X      report_progress (report, error, TRUE),\
  1831. X      exit (1);\
  1832. X    COMPLETE_FILE (f);\
  1833. X    fclose (f);\
  1834. X  }
  1835. X
  1836. X#define NOTIFY_MANAGER(msg) \
  1837. X  create_header (&f, MAILFORWARD, sys.server.address, sys.manager, sender);\
  1838. X  fprintf (f, "%s %s\n", msg, sender);\
  1839. X  COMPLETE_TELNET (f);\
  1840. X  fclose (f);\
  1841. X  DELIVER_MAIL (sys.manager);\
  1842. X  sprintf (error, "%s %s; forwarding message to %s\n", msg, sender,\
  1843. X       sys.manager);\
  1844. X  report_progress (report, error, FALSE)
  1845. X
  1846. X#define NOTIFY_OF_BAD_ARCHIVE(msg, archive) \
  1847. X  create_header (&f, MAILFORWARD, sys.server.address, sender, request);\
  1848. X  fprintf (f, msg, archive);\
  1849. X  COMPLETE_TELNET (f);\
  1850. X  fclose (f);\
  1851. X  DELIVER_MAIL (sender)
  1852. X
  1853. X
  1854. char recipf [MAX_LINE];      /* path to list + RECIP_FILE */
  1855. X
  1856. XFILE *mail        = NULL; /* Source of messages */
  1857. XFILE *report      = NULL; /* Progress report to the administrator */
  1858. XFILE *subscribers = NULL; /* List of subscribers */
  1859. XFILE *ignored     = NULL; /* List of people whose messages are ignored */
  1860. XFILE *msg_no      = NULL; /* Last message count */
  1861. XFILE *message_ids = NULL; /* List of message ids */
  1862. X
  1863. int     listid = -1;
  1864. int     request_no = 0;             /* Counts the public messages */
  1865. int     restricted_commands = 0;    /* Mask of restrictions */
  1866. int    disabled_commands = 0;        /* Mask for disabling commands */
  1867. int     nlists = -1;                /* # of lists defined in CONFIG */
  1868. BOOLEAN one_rejection = FALSE;
  1869. BOOLEAN restart_sys = FALSE;
  1870. BOOLEAN tty_echo = FALSE;        /* -e option off */
  1871. BOOLEAN do_not_notify_peer_server = FALSE;
  1872. BOOLEAN peer_server_request = FALSE;
  1873. char    *options [] = { "MAIL" }; /* valid SET options */
  1874. char    *values [] = { "ACK|NOACK|NEVERACK|POSTPONE" }; /* and values */
  1875. char    *default_values [] = { "NOACK" };
  1876. END_OF_FILE
  1877. if test 4151 -ne `wc -c <'src/listserv.h'`; then
  1878.     echo shar: \"'src/listserv.h'\" unpacked with wrong size!
  1879. fi
  1880. # end of 'src/listserv.h'
  1881. fi
  1882. if test -f 'src/pqueue.c' -a "${1}" != "-c" ; then 
  1883.   echo shar: Will not clobber existing file \"'src/pqueue.c'\"
  1884. else
  1885. echo shar: Extracting \"'src/pqueue.c'\" \(3728 characters\)
  1886. sed "s/^X//" >'src/pqueue.c' <<'END_OF_FILE'
  1887. X/*
  1888. X  ----------------------------------------------------------------------------
  1889. X  |                    MAIL QUEUE PROCESSING ROUTINES                        |
  1890. X  |                                                                          |
  1891. X  |                             Version 1.0                                  |
  1892. X  |                                                                          |
  1893. X  |                (or, when Computer Science gets to you)                   |
  1894. X  |                                                                          |
  1895. X  |                    Written by Anastasios Kotsikonas                      |
  1896. X  |                           (tasos@cs.bu.edu)                              |
  1897. X  |                                                                          |
  1898. X  | AGREEMENT: This software can be used and distributed freely as long      |
  1899. X  | as you do not remove or alter the Copyright notice in the file defs.h;   |
  1900. X  | this notice is #define'd in the symbol VERSION. Although you may alter   |
  1901. X  | the code provided, you may not alter the functions create_header()       |
  1902. X  | and create_multi_recipient_header() in list.c and listserv.c.            |
  1903. X  | By using this software you are bound by this agreement.                  |
  1904. X  | This software comes with no warranties and cannot be sold for profit.    |
  1905. X  | The AGREEMENT and COPYRIGHT notices should be included in all source     |
  1906. X  | files when distributing this software.                                   |
  1907. X  | COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas                  |
  1908. X  ----------------------------------------------------------------------------
  1909. X
  1910. X  The 'system' mailmethod is used to attempt another delivery of the
  1911. X  specified file. If it cannot be done, the file is queued again.
  1912. X*/
  1913. X
  1914. X#include <stdio.h>
  1915. X#include <unistd.h>
  1916. X#include <sys/types.h>
  1917. X#include <sys/stat.h>
  1918. X#include <fcntl.h>
  1919. X#include <signal.h>
  1920. X#include "defs.h"
  1921. X#include "struct.h"
  1922. X#include "global.h"
  1923. X#include "pqueue.h"
  1924. X
  1925. extern BOOLEAN sysmail (char *);
  1926. X
  1927. void   main (int, char **, char **);
  1928. void   usage (void);
  1929. void   gexit (void);
  1930. X
  1931. void main (int argc, char **argv, char **envp)
  1932. X{
  1933. X  char msg [MAX_LINE], *options = "eD";
  1934. X  int c;
  1935. X  FILE *f;
  1936. X  struct stat stat_buf;
  1937. X  extern char *optarg;
  1938. X  extern int optopt, optind;
  1939. X
  1940. X  while ((c = getopt (argc, argv, options)) != EOF)
  1941. X    switch ((char) c) {
  1942. X    case 'e': tty_echo = TRUE; break;
  1943. X    case 'D': debug = TRUE; break;
  1944. X    case '?':
  1945. X    default:
  1946. X      usage ();
  1947. X  }
  1948. X  if (argc < 2)
  1949. X    fprintf (stderr, "pqueue: filename(s) missing.\n"),
  1950. X    exit (3);
  1951. X#ifndef _MINIX
  1952. X  if (lockf (open (PQUEUE_LOCK_FILE, O_RDWR), F_TLOCK, 0))
  1953. X    fprintf (stderr, "pqueue: Unable to lock %s. Aborting.\n",
  1954. X         PQUEUE_LOCK_FILE),
  1955. X    exit (2);
  1956. X#endif
  1957. X  init_signals();
  1958. X  catch_signals();
  1959. X  if ((report = fopen (REPORT_PQUEUE, "a")) == NULL)
  1960. X    fprintf (stderr, "pqueue: Could not open %s\n", REPORT_PQUEUE),
  1961. X    exit (1);
  1962. X  if ((f = fopen (PID_PQUEUE, "w")) != NULL)
  1963. X    fprintf (f, "%d", getpid()),
  1964. X    fclose (f);
  1965. X  signal (SIGINT, gexit);
  1966. X  while (--argc >= optind) { /* main loop */
  1967. X    if (stat (argv [argc], &stat_buf))
  1968. X      sprintf (msg, "\nmain(): Could not stat %s", argv [argc]),
  1969. X      report_progress (report, msg, TRUE),
  1970. X      exit (1);
  1971. X    if (sysmail (argv [argc]))
  1972. X      if (unlink (argv [argc]))
  1973. X    sprintf (msg, "\nmain(): Could not unlink file %s", argv [argc]),
  1974. X     report_progress (report, msg, TRUE),
  1975. X    exit (1);
  1976. X  }
  1977. X  fclose (report);
  1978. X  gexit ();
  1979. X}
  1980. X
  1981. void usage ()
  1982. X{
  1983. X  fprintf (stderr, "Usage: pqueue [-e] [-D] <files>\n\
  1984. X-e: Echo reports to the screen.\n\
  1985. X-D: Turn debug on.\n");
  1986. X  exit (3);
  1987. X}
  1988. X
  1989. X/*
  1990. X  Graceful exit. Remove pid file.
  1991. X*/
  1992. X
  1993. void gexit ()
  1994. X{
  1995. X  unlink (PID_PQUEUE);
  1996. X  exit (0);
  1997. X}
  1998. END_OF_FILE
  1999. if test 3728 -ne `wc -c <'src/pqueue.c'`; then
  2000.     echo shar: \"'src/pqueue.c'\" unpacked with wrong size!
  2001. fi
  2002. # end of 'src/pqueue.c'
  2003. fi
  2004. if test -f 'src/pqueue.h' -a "${1}" != "-c" ; then 
  2005.   echo shar: Will not clobber existing file \"'src/pqueue.h'\"
  2006. else
  2007. echo shar: Extracting \"'src/pqueue.h'\" \(911 characters\)
  2008. sed "s/^X//" >'src/pqueue.h' <<'END_OF_FILE'
  2009. X/*
  2010. X  AGREEMENT: This software can be used and distributed freely as long
  2011. X  as you do not remove or alter the Copyright notice in the file defs.h;
  2012. X  this notice is #define'd in the symbol VERSION. Although you may alter
  2013. X  the code provided, you may not alter the functions create_header()
  2014. X  and create_multi_recipient_header() in list.c and listserv.c.
  2015. X  By using this software you are bound by this agreement.
  2016. X  This software comes with no warranties and cannot be sold for profit.
  2017. X  The AGREEMENT and COPYRIGHT notices should be included in all source
  2018. X  files when distributing this software.
  2019. X  COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas
  2020. X
  2021. X  Below are the #define's pertinent to pqueue.c
  2022. X
  2023. X  Preserve any quotes and new lines that appear below; change only path names.
  2024. X
  2025. X  ALWAYS SPECIFY ABSOLUTE PATHS.
  2026. X
  2027. X*/
  2028. X
  2029. XFILE *report        = NULL;  /* Progress report */
  2030. BOOLEAN tty_echo    = FALSE; /* -e option off */
  2031. END_OF_FILE
  2032. if test 911 -ne `wc -c <'src/pqueue.h'`; then
  2033.     echo shar: \"'src/pqueue.h'\" unpacked with wrong size!
  2034. fi
  2035. # end of 'src/pqueue.h'
  2036. fi
  2037. if test -f 'src/serverd.h' -a "${1}" != "-c" ; then 
  2038.   echo shar: Will not clobber existing file \"'src/serverd.h'\"
  2039. else
  2040. echo shar: Extracting \"'src/serverd.h'\" \(881 characters\)
  2041. sed "s/^X//" >'src/serverd.h' <<'END_OF_FILE'
  2042. X/*
  2043. X  AGREEMENT: This software can be used and distributed freely as long
  2044. X  as you do not remove or alter the Copyright notice in the file defs.h;
  2045. X  this notice is #define'd in the symbol VERSION. Although you may alter
  2046. X  the code provided, you may not alter the functions create_header()
  2047. X  and create_multi_recipient_header() in list.c and listserv.c.
  2048. X  By using this software you are bound by this agreement.
  2049. X  This software comes with no warranties and cannot be sold for profit.
  2050. X  The AGREEMENT and COPYRIGHT notices should be included in all source
  2051. X  files when distributing this software.
  2052. X  COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas
  2053. X
  2054. X  Below are the #define's pertinent to serverd.c
  2055. X
  2056. X  ALWAYS SPECIFY ABSOLUTE PATHS.
  2057. X
  2058. X*/
  2059. X
  2060. X#define LOAD_FILE     PATH/.load"
  2061. X#define MAX_TRIES     10      /* wait MAX_TRIES * 30 seconds */
  2062. X
  2063. BOOLEAN tty_echo = FALSE;     /* -e option off */
  2064. END_OF_FILE
  2065. if test 881 -ne `wc -c <'src/serverd.h'`; then
  2066.     echo shar: \"'src/serverd.h'\" unpacked with wrong size!
  2067. fi
  2068. # end of 'src/serverd.h'
  2069. fi
  2070. if test -f 'src/signals.c' -a "${1}" != "-c" ; then 
  2071.   echo shar: Will not clobber existing file \"'src/signals.c'\"
  2072. else
  2073. echo shar: Extracting \"'src/signals.c'\" \(2997 characters\)
  2074. sed "s/^X//" >'src/signals.c' <<'END_OF_FILE'
  2075. X/*
  2076. X  ----------------------------------------------------------------------------
  2077. X  |                            SIGNAL FUNCTIONS                              |
  2078. X  |                                                                          |
  2079. X  |                              Version 2.0                                 |
  2080. X  |                                                                          |
  2081. X  |                (or, when Computer Science gets to you)                   |
  2082. X  |                                                                          |
  2083. X  |                    Written by Anastasios Kotsikonas                      |
  2084. X  |                           (tasos@cs.bu.edu)                              |
  2085. X  |                                                                          |
  2086. X  | AGREEMENT: This software can be used and distributed freely as long      |
  2087. X  | as you do not remove or alter the Copyright notice in the file defs.h;   |
  2088. X  | this notice is #define'd in the symbol VERSION. Although you may alter   |
  2089. X  | the code provided, you may not alter the functions create_header()       |
  2090. X  | and create_multi_recipient_header() in list.c and listserv.c.            |
  2091. X  | By using this software you are bound by this agreement.                  |
  2092. X  | This software comes with no warranties and cannot be sold for profit.    |
  2093. X  | The AGREEMENT and COPYRIGHT notices should be included in all source     |
  2094. X  | files when distributing this software.                                   |
  2095. X  | COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas                  |
  2096. X  ----------------------------------------------------------------------------
  2097. X*/
  2098. X
  2099. X#include <stdio.h>
  2100. X#include <signal.h>
  2101. X#include "defs.h"
  2102. X#include "struct.h"
  2103. X
  2104. extern void report_progress (FILE *, char *, int);
  2105. X
  2106. void   init_signals (void);
  2107. void   catch_signals (void);
  2108. void   my_abort (int);
  2109. X
  2110. static char *signals[MAX_SIGNAL + 1];   /* Signal names */
  2111. X
  2112. X/*
  2113. X  Initialize the signals[].
  2114. X*/
  2115. X
  2116. void init_signals ()
  2117. X{
  2118. X  signals[SIGHUP] = "SIGHUP";
  2119. X  signals[SIGINT] = "SIGINT";
  2120. X  signals[SIGQUIT] = "SIGQUIT";
  2121. X  signals[SIGTERM] = "SIGTERM";
  2122. X  signals[SIGBUS] = "SIGBUS";
  2123. X  signals[SIGSEGV] = "SIGSEGV";
  2124. X}
  2125. X
  2126. X/*
  2127. X  Catch signals to print messages before aborting.
  2128. X*/
  2129. X
  2130. void catch_signals ()
  2131. X{
  2132. X  signal (SIGHUP, my_abort);
  2133. X  signal (SIGQUIT, my_abort);
  2134. X  signal (SIGTERM, my_abort);
  2135. X  signal (SIGSEGV, my_abort);
  2136. X  signal (SIGBUS, my_abort);
  2137. X  signal (SIGKILL, my_abort); /* Can't be caught, but why not try? */
  2138. X}
  2139. X
  2140. X/*
  2141. X  Kill program after sending message to MANAGER that this is
  2142. X  about to happen (message is sent only when using UCB mail).
  2143. X*/
  2144. X
  2145. void my_abort (int sig)
  2146. X{
  2147. X  extern SYS sys;
  2148. X
  2149. X  if (sig == SIGHUP) { /* Damn AIX passes signals from children to parents */
  2150. X    signal (SIGHUP, my_abort);
  2151. X    return;
  2152. X  }
  2153. X  printf ("\n*** Received %s signal ***\n", signals[sig]);
  2154. X  if (sys.options & BSD_MAIL)
  2155. X    syscom ("%s -s \"SERVERD/SERVER/LIST received %s\" %s &", UCB_MAIL,
  2156. X        signals[sig], sys.manager);
  2157. X  exit (8);
  2158. X}
  2159. END_OF_FILE
  2160. if test 2997 -ne `wc -c <'src/signals.c'`; then
  2161.     echo shar: \"'src/signals.c'\" unpacked with wrong size!
  2162. fi
  2163. # end of 'src/signals.c'
  2164. fi
  2165. if test -f 'src/start.h' -a "${1}" != "-c" ; then 
  2166.   echo shar: Will not clobber existing file \"'src/start.h'\"
  2167. else
  2168. echo shar: Extracting \"'src/start.h'\" \(1197 characters\)
  2169. sed "s/^X//" >'src/start.h' <<'END_OF_FILE'
  2170. X/*
  2171. X  AGREEMENT: This software can be used and distributed freely as long
  2172. X  as you do not remove or alter the Copyright notice in the file defs.h;
  2173. X  this notice is #define'd in the symbol VERSION. Although you may alter
  2174. X  the code provided, you may not alter the functions create_header()
  2175. X  and create_multi_recipient_header() in list.c and listserv.c.
  2176. X  By using this software you are bound by this agreement.
  2177. X  This software comes with no warranties and cannot be sold for profit.
  2178. X  The AGREEMENT and COPYRIGHT notices should be included in all source
  2179. X  files when distributing this software.
  2180. X  COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas
  2181. X
  2182. X  Below are the #define's pertinent to start.c
  2183. X
  2184. X  Preserve any quotes that appear below; change only path names.
  2185. X
  2186. X  ALWAYS SPECIFY ABSOLUTE PATHS.
  2187. X
  2188. X*/
  2189. X
  2190. X#define REPORT_LIST_ACC     ".rep.list.acc"
  2191. X#define REPORT_SERVER_ACC   PATH/.rep.server.acc"
  2192. X#define REPORT_SERVERD_ACC  PATH/.rep.serverd.acc"
  2193. X#define REPORT_START_ACC    PATH/.rep.start.acc"
  2194. X#define REPORT_PQUEUE_ACC   PATH/.rep.pqueue.acc"
  2195. X#define REPORT_START        PATH/.report.start"
  2196. X#define MODERATED_MAIL_FILE "moderated"
  2197. X
  2198. char    report_list_accf [MAX_LINE];
  2199. BOOLEAN tty_echo = TRUE;
  2200. END_OF_FILE
  2201. if test 1197 -ne `wc -c <'src/start.h'`; then
  2202.     echo shar: \"'src/start.h'\" unpacked with wrong size!
  2203. fi
  2204. # end of 'src/start.h'
  2205. fi
  2206. if test -f 'src/struct.h' -a "${1}" != "-c" ; then 
  2207.   echo shar: Will not clobber existing file \"'src/struct.h'\"
  2208. else
  2209. echo shar: Extracting \"'src/struct.h'\" \(2195 characters\)
  2210. sed "s/^X//" >'src/struct.h' <<'END_OF_FILE'
  2211. X/*
  2212. X  AGREEMENT: This software can be used and distributed freely as long
  2213. X  as you do not remove or alter the Copyright notice in the file defs.h;
  2214. X  this notice is #define'd in the symbol VERSION. Although you may alter
  2215. X  the code provided, you may not alter the functions create_header()
  2216. X  and create_multi_recipient_header() in list.c and listserv.c.
  2217. X  By using this software you are bound by this agreement.
  2218. X  This software comes with no warranties and cannot be sold for profit.
  2219. X  The AGREEMENT and COPYRIGHT notices should be included in all source
  2220. X  files when distributing this software.
  2221. X  COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas
  2222. X*/
  2223. X
  2224. typedef struct {
  2225. X  struct {
  2226. X    char alias [MAX_LINE],    /* as it appears in the aliases file */
  2227. X     comment [MAX_LINE],    /* Comment: line in the outgoing mail message */
  2228. X         address [MAX_LINE],    /* full email address of the list */
  2229. X         cmdoptions [MAX_LINE];    /* list-specific command line options */
  2230. X    int  disabled_commands;    /* mask of disabled commands for this list */
  2231. X  } lists [MAX_LISTS];        /* structure for each list */
  2232. X  struct {
  2233. X    char address [MAX_LINE],    /* full email address of the server */
  2234. X     comment [MAX_LINE],    /* Comment: line in the outgoing mail message */
  2235. X         cmdoptions [MAX_LINE],    /* listserv-specific command line options */
  2236. X     password [MAX_LINE];    /* for 'shutdown' and 'restart' */
  2237. X  } server;            /* structure for the server */
  2238. X  struct {
  2239. X    char *method;        /* mail method to use */
  2240. X    char env_var [MAX_LINE];    /* environment variable to use */
  2241. X    char mail_prog [MAX_LINE];    /* which mail program to use */
  2242. X  } mail;            /* mail method structure */
  2243. X  struct {
  2244. X    long int msg;        /* maximum message limit in bytes */
  2245. X  } limits;
  2246. X  char serverd_cmdoptions [MAX_LINE];/* command line options */
  2247. X  char manager [MAX_LINE];    /* manager of the system */
  2248. X  char arg [MAX_LINE];        /* temporary storage */
  2249. X  char organization [MAX_LINE]; /* Organization's name */
  2250. X  int users;            /* used by listserv when -r is given */
  2251. X  int frequency;        /* how often to read mail */
  2252. X  long int options;        /* various flags: BSD_PS, USE_TELNET, etc. */
  2253. X} SYS;
  2254. X
  2255. typedef struct {
  2256. X  char *name;
  2257. X  int  mask;
  2258. X  void (*func)();
  2259. X} COMMANDS;
  2260. END_OF_FILE
  2261. if test 2195 -ne `wc -c <'src/struct.h'`; then
  2262.     echo shar: \"'src/struct.h'\" unpacked with wrong size!
  2263. fi
  2264. # end of 'src/struct.h'
  2265. fi
  2266. if test -f 'src/tlock.c' -a "${1}" != "-c" ; then 
  2267.   echo shar: Will not clobber existing file \"'src/tlock.c'\"
  2268. else
  2269. echo shar: Extracting \"'src/tlock.c'\" \(2280 characters\)
  2270. sed "s/^X//" >'src/tlock.c' <<'END_OF_FILE'
  2271. X/*
  2272. X  ----------------------------------------------------------------------------
  2273. X  |                        tlock UTILITY                      |
  2274. X  |                                                                          |
  2275. X  |                              Version 1.0                                 |
  2276. X  |                                                                          |
  2277. X  |                (or, when Computer Science gets to you)                   |
  2278. X  |                                                                          |
  2279. X  |                    Written by Anastasios Kotsikonas                      |
  2280. X  |                           (tasos@cs.bu.edu)                              |
  2281. X  |                                                                          |
  2282. X  | AGREEMENT: This software can be used and distributed freely as long      |
  2283. X  | as you do not remove or alter the Copyright notice in the file defs.h;   |
  2284. X  | this notice is #define'd in the symbol VERSION. Although you may alter   |
  2285. X  | the code provided, you may not alter the functions create_header()       |
  2286. X  | and create_multi_recipient_header() in list.c and listserv.c.            |
  2287. X  | By using this software you are bound by this agreement.                  |
  2288. X  | This software comes with no warranties and cannot be sold for profit.    |
  2289. X  | The AGREEMENT and COPYRIGHT notices should be included in all source     |
  2290. X  | files when distributing this software.                                   |
  2291. X  | COPYRIGHT: Copyright (c) 1991, Anastasios C. Kotsikonas                  |
  2292. X  ----------------------------------------------------------------------------
  2293. X*/
  2294. X
  2295. X#include <stdio.h>
  2296. X#include <unistd.h>
  2297. X#include <fcntl.h>
  2298. X#include <errno.h>
  2299. X#include "defs.h"
  2300. X
  2301. void main ();
  2302. X
  2303. char *s[] = { 
  2304. X  SERVERD_LOCK_FILE, LIST_LOCK_FILE, SERVER_LOCK_FILE, PQUEUE_LOCK_FILE, NULL
  2305. X};
  2306. X
  2307. X/*
  2308. X  Test whether any locks exist on the above files by other processes.
  2309. X*/
  2310. X
  2311. void main ()
  2312. X{
  2313. X#ifndef _MINIX
  2314. X  int i, fd, locks = 0;
  2315. X
  2316. X  for (i = 0; s[i]; i++) {
  2317. X    if (lockf ((fd = open (s[i], O_RDWR)), F_TLOCK, 0))
  2318. X      if (errno == EBADF)
  2319. X    locks = -1,
  2320. X    fprintf (stderr, "Cannot access %s\n", s[i]);
  2321. X      else
  2322. X    ++locks,
  2323. X    printf ("Lock placed on %s\n", s[i]);
  2324. X    close (fd);
  2325. X  }
  2326. X  if (!locks)
  2327. X#endif
  2328. X    printf ("No files locked.\n");
  2329. X}
  2330. END_OF_FILE
  2331. if test 2280 -ne `wc -c <'src/tlock.c'`; then
  2332.     echo shar: \"'src/tlock.c'\" unpacked with wrong size!
  2333. fi
  2334. # end of 'src/tlock.c'
  2335. fi
  2336. if test -f 'stds' -a "${1}" != "-c" ; then 
  2337.   echo shar: Will not clobber existing file \"'stds'\"
  2338. else
  2339. echo shar: Extracting \"'stds'\" \(354 characters\)
  2340. sed "s/^X//" >'stds' <<'END_OF_FILE'
  2341. X#!/bin/sh
  2342. if [ $# = 0 ]; then
  2343. X  echo Usage: `basename $0` \<system source C and header files\>
  2344. fi
  2345. for i
  2346. do
  2347. X  if [ ! -r $i ]; then
  2348. X    echo $i: not found
  2349. X  else
  2350. X    echo $i
  2351. X    sed 's/\"\/usr\/server/\"\/usr\/server\"/' $i > /tmp/s
  2352. X    sed 's/PATH\//\"\/usr\/server\//' /tmp/s > /tmp/t
  2353. X    sed 's/PATH\"/PATH/' /tmp/t > $i 
  2354. X    rm /tmp/t /tmp/s
  2355. X  fi
  2356. done
  2357. END_OF_FILE
  2358. if test 354 -ne `wc -c <'stds'`; then
  2359.     echo shar: \"'stds'\" unpacked with wrong size!
  2360. fi
  2361. chmod +x 'stds'
  2362. # end of 'stds'
  2363. fi
  2364. if test -f 'ulock' -a "${1}" != "-c" ; then 
  2365.   echo shar: Will not clobber existing file \"'ulock'\"
  2366. else
  2367. echo shar: Extracting \"'ulock'\" \(133 characters\)
  2368. sed "s/^X//" >'ulock' <<'END_OF_FILE'
  2369. X#!/bin/sh
  2370. X# ulock - in conjunction with the file 'flocks', this utility removes all
  2371. X#        locked files.
  2372. X/lib/cpp flocks | /bin/sh
  2373. END_OF_FILE
  2374. if test 133 -ne `wc -c <'ulock'`; then
  2375.     echo shar: \"'ulock'\" unpacked with wrong size!
  2376. fi
  2377. # end of 'ulock'
  2378. fi
  2379. echo shar: End of archive 1 \(of 6\).
  2380. cp /dev/null ark1isdone
  2381. MISSING=""
  2382. for I in 1 2 3 4 5 6 ; do
  2383.     if test ! -f ark${I}isdone ; then
  2384.     MISSING="${MISSING} ${I}"
  2385.     fi
  2386. done
  2387. if test "${MISSING}" = "" ; then
  2388.     echo You have unpacked all 6 archives.
  2389.     rm -f ark[1-9]isdone
  2390. else
  2391.     echo You still need to unpack the following archives:
  2392.     echo "        " ${MISSING}
  2393. fi
  2394. ##  End of shell archive.
  2395. exit 0
  2396.